.reports-main { background:radial-gradient(circle at 91% 7%,rgba(72,115,139,.07),transparent 29%); }
.back-dashboard { display:inline-flex; align-items:center; min-height:32px; padding:0 11px; border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.42); color:#694f3d; font-size:11px; font-weight:650; white-space:nowrap; }
.back-dashboard:hover { border-color:var(--copper); color:var(--copper-dark); }
.sync-button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:0 10px; border:1px solid #bcc5a6; border-radius:8px; background:#f2f5eb; color:#5c6a40; font-size:11px; font-weight:700; cursor:pointer; }
.sync-button:hover { background:#e8eddc; }
.sync-button svg { width:15px; height:15px; }

.reports-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; padding:5px; border:1px solid var(--line); border-radius:11px; background:rgba(245,237,226,.74); box-shadow:var(--shadow); }
.reports-tabs { display:flex; gap:3px; }
.reports-tab { display:flex; align-items:center; justify-content:center; gap:7px; min-height:37px; padding:0 14px; border:0; border-radius:8px; background:transparent; color:#5d554d; font-size:11.5px; font-weight:700; cursor:pointer; }
.reports-tab:hover { background:rgba(255,255,255,.54); }
.reports-tab b { display:grid; place-items:center; min-width:18px; height:18px; padding:0 5px; border-radius:10px; background:#f0d9cc; color:#a65b3f; font-size:8px; }
.reports-tab.active { background:linear-gradient(135deg,#74794a,#61663b); color:#fff; box-shadow:0 3px 10px rgba(71,74,42,.15); }
.reports-tab.active b { background:rgba(255,255,255,.17); color:#fff; }
.toolbar-actions { display:flex; align-items:center; gap:7px; }
.toolbar-actions label { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:9px; }
.toolbar-actions select { height:32px; min-width:125px; padding:0 26px 0 9px; border:1px solid var(--line); border-radius:7px; background:#fffaf5; color:#5e574f; font-size:10.5px; }
.toolbar-actions button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:0 10px; border:1px solid #d8c5b1; border-radius:7px; background:#fffaf5; color:#76513d; font-size:10px; font-weight:700; cursor:pointer; }
.toolbar-actions button:hover { border-color:var(--copper); background:#fff4e9; }
.toolbar-actions svg { width:14px; height:14px; }

.report-builder { display:grid; grid-template-columns:1.25fr 1.2fr .8fr .55fr auto; align-items:end; gap:10px; margin:0 0 12px; padding:13px 14px; border:1px solid #d9c7b4; border-radius:12px; background:#fff9f1; box-shadow:0 8px 24px rgba(76,56,35,.07); }
.report-builder[hidden] { display:none; }
.report-builder h2 { margin:0; color:#4a3b30; font-size:15px; }
.report-builder p { margin:3px 0 0; color:var(--muted); font-size:9.5px; }
.report-builder label span { display:block; margin-bottom:4px; color:#766d63; font-size:8.5px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
.report-builder input,.report-builder select { width:100%; height:36px; border:1px solid #decfbd; border-radius:7px; padding:0 9px; background:#fff; outline:none; }
.report-builder input:focus,.report-builder select:focus { border-color:#ad805e; box-shadow:0 0 0 3px rgba(173,128,94,.1); }
.report-builder > div:last-child { display:flex; gap:6px; }
.report-builder > div:last-child button { min-height:36px; border:1px solid #dcc9b7; border-radius:7px; padding:0 10px; background:#fff; font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }
.report-builder > div:last-child button:last-child { border-color:#697143; background:#6d7344; color:#fff; }

.reports-view[hidden] { display:none; }
.reports-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:11px; margin-bottom:12px; }
.reports-kpi-grid .kpi-card { height:124px; padding:16px 14px 13px; }
.reports-kpi-grid .kpi-card > strong { margin-top:10px; font-size:21px; }
.reports-kpi-grid .kpi-meta { margin-top:12px; }
.reports-dashboard-grid .span-12 { grid-column:span 12; }
.reports-dashboard-grid .span-8 { grid-column:span 8; }
.reports-dashboard-grid .span-7 { grid-column:span 7; }
.reports-dashboard-grid .span-5 { grid-column:span 5; }
.reports-dashboard-grid .span-4 { grid-column:span 4; }
.reports-dashboard-grid .panel { overflow:hidden; }
.reports-dashboard-grid .panel-heading { align-items:flex-start; }
.reports-dashboard-grid .panel-heading p { margin:3px 0 0; color:var(--muted); font-size:10.5px; }
.panel-period { flex:0 0 auto; padding:4px 8px; border-radius:6px; background:#f8eee1; color:#766a5f; font-size:9.5px; }

.performance-panel,.reports-insight { min-height:355px; }
.report-legend { display:flex; align-items:center; gap:6px; color:#6e655d; font-size:8.5px; white-space:nowrap; }
.report-legend span { width:15px; height:7px; border-radius:2px; }
.report-legend .revenue-key { background:#d79b4c; }
.report-legend .cost-key { background:#87945f; }
.report-legend i { width:15px; margin-left:5px; border-top:2px solid #3f4033; }
.report-chart { display:grid; grid-template-columns:45px 1fr; height:280px; margin-top:8px; }
.report-y { display:flex; flex-direction:column; justify-content:space-between; padding-bottom:25px; color:#645e57; font-size:9.5px; }
.report-plot { position:relative; display:flex; align-items:flex-end; justify-content:space-around; padding:0 14px 25px; }
.plot-lines { position:absolute; inset:0 0 25px; display:flex; flex-direction:column; justify-content:space-between; }
.plot-lines i { border-top:1px solid #eae2d8; }
.report-month { position:relative; z-index:1; display:flex; align-items:flex-end; gap:5px; width:54px; height:100%; }
.report-bar { width:18px; height:var(--h); border-radius:3px 3px 0 0; }
.revenue-bar { background:linear-gradient(90deg,#c88c3e,#dda65b); }
.cost-bar { background:linear-gradient(90deg,#74824f,#94a36a); }
.report-month small { position:absolute; bottom:-20px; left:0; width:43px; text-align:center; font-size:9.5px; }
.report-plot svg { position:absolute; z-index:2; inset:0 0 25px; width:100%; height:calc(100% - 25px); pointer-events:none; }
.report-plot polyline { fill:none; stroke:#414238; stroke-width:2; }
.report-plot circle { fill:#414238; stroke:none; }
.reports-insight p strong { color:#ffd2aa; }
.insight-metrics { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin:auto 0 15px; border:1px solid rgba(255,255,255,.17); border-radius:8px; overflow:hidden; }
.insight-metrics span { display:grid; padding:10px 12px; background:rgba(255,255,255,.04); }
.insight-metrics small { color:#e5e3d4; font-size:9px; }
.insight-metrics b { margin-top:2px; color:#efbd91; font-size:15px; }

.channel-panel,.status-panel { min-height:340px; }
.channel-table { display:grid; margin-top:9px; }
.channel-table > div { display:grid; grid-template-columns:1.3fr .8fr .55fr .65fr; align-items:center; min-height:53px; border-top:1px solid #eee4d9; }
.channel-table .table-head { min-height:30px; border-top:0; color:#7b7167; font-size:8.5px; text-transform:uppercase; }
.channel-table > div > :not(:first-child) { text-align:right; }
.channel-table > div > span:first-child { display:flex; align-items:center; gap:7px; }
.channel-table i { width:9px; height:9px; border-radius:50%; }
.restaurant-dot { background:#d69a4c; }
.webshop-dot { background:#7c8d51; }
.events-dot { background:#90715b; }
.channel-table strong { font-size:11.5px; }
.channel-table b { font-size:11px; }
.channel-table em { font-size:9.5px; font-style:normal; }
.channel-total { min-height:46px!important; border-top:2px solid #d3c1ae!important; background:#faf4ec; }
.ready-label { padding:4px 8px; border-radius:10px; background:#e4ebd9; color:#617644; font-size:9px; font-weight:750; }
.status-list { display:grid; }
.status-list > div { display:grid; grid-template-columns:36px 1fr auto; align-items:center; gap:9px; min-height:62px; border-bottom:1px solid #eee4d9; }
.status-list strong,.status-list small { display:block; }
.status-list strong { font-size:11px; }
.status-list small { margin-top:2px; color:var(--muted); font-size:8.5px; }
.status-list > div > b { color:#657647; font-size:8.5px; }
.status-list > div:nth-child(3) > b { color:#9c632e; }
.status-icon { display:grid; place-items:center; width:31px; height:31px; border-radius:9px; }
.status-icon svg { width:16px; height:16px; }
.status-icon.ready { background:#e6ecd9; color:#647846; }
.status-icon.attention { background:#f4e5ca; color:#97612b; }
.secondary-report-button { width:100%; min-height:36px; margin-top:12px; border:1px solid #d8c6b3; border-radius:8px; background:#fffaf4; color:#72523f; font-size:10px; font-weight:700; cursor:pointer; }

.report-flow-panel { min-height:195px; }
.live-label { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:12px; background:#e7eddc; color:#607642; font-size:9px; font-weight:700; white-space:nowrap; }
.live-label i { width:6px; height:6px; border-radius:50%; background:#6b8348; box-shadow:0 0 0 3px rgba(107,131,72,.12); }
.report-flow { display:grid; grid-template-columns:1fr 25px 1fr 25px 1fr 25px 1fr 25px 1fr; align-items:center; gap:6px; margin:24px auto 0; max-width:1040px; }
.report-flow > span { display:grid; grid-template-columns:37px 1fr; grid-template-rows:auto auto; align-items:center; column-gap:8px; min-width:0; }
.report-flow > span b { grid-row:1/3; display:grid; place-items:center; width:35px; height:35px; border-radius:10px; background:#6e7447; color:#fff; font-size:12px; }
.report-flow > span:nth-of-type(1) b { background:#393e43; }
.report-flow > span:nth-of-type(3) b { background:#3d79a8; }
.report-flow > span:nth-of-type(4) b { background:#997049; }
.report-flow > span:nth-of-type(5) b { background:#a65d46; }
.report-flow strong,.report-flow small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-flow strong { font-size:10px; }
.report-flow small { color:var(--muted); font-size:8.5px; }
.report-flow > i { color:#bc987a; font-size:15px; font-style:normal; text-align:center; }

.library-tools { display:grid; grid-template-columns:1fr 190px 165px; align-items:center; gap:10px; margin-bottom:12px; padding:14px 15px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.4); }
.library-tools h2 { margin:0; color:#4a3b30; font-size:15px; text-transform:uppercase; }
.library-tools p { margin:3px 0 0; color:var(--muted); font-size:10.5px; }
.report-search { display:flex; align-items:center; height:35px; border:1px solid #dfd1c1; border-radius:8px; background:#fffaf5; }
.report-search svg { width:15px; height:15px; margin-left:9px; color:#978575; }
.report-search input { min-width:0; width:100%; height:100%; border:0; padding:0 8px; background:transparent; outline:none; font-size:10px; }
.library-tools > select { height:35px; border:1px solid #dfd1c1; border-radius:8px; padding:0 27px 0 9px; background:#fffaf5; color:#5d554c; font-size:10px; }
.report-library { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.report-card { display:grid; grid-template-rows:auto 1fr auto; min-height:238px; padding:15px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.42); box-shadow:var(--shadow); transition:.18s ease; }
.report-card:hover { transform:translateY(-2px); border-color:#d8bda5; box-shadow:0 9px 25px rgba(85,63,39,.08); }
.report-card[hidden] { display:none; }
.report-card-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:10px; }
.report-card-icon svg { width:19px; height:19px; }
.management-icon { background:#e7ecd9; color:#647846; }
.finance-icon { background:#e1ebf1; color:#4d7895; }
.restaurant-icon,.foodcost-icon { background:#f3e4d5; color:#a15c40; }
.stock-icon { background:#ece3d8; color:#87654f; }
.staff-icon { background:#e5e2ee; color:#6e6684; }
.webshop-icon { background:#f3e7ce; color:#95682c; }
.report-category { display:inline-flex; margin-top:10px; color:#9b765e; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.35px; }
.report-card h3 { margin:4px 0 5px; color:#40362e; font-size:12.5px; }
.report-card p { margin:0; color:#625b54; font-size:9.5px; line-height:1.45; }
.report-card small { display:block; margin-top:8px; color:#968b80; font-size:8.5px; }
.report-card button { display:flex; align-items:center; justify-content:center; gap:6px; min-height:35px; margin-top:13px; border:1px solid #6c7446; border-radius:8px; background:#71764a; color:#fff; font-size:9.5px; font-weight:750; cursor:pointer; }
.report-card button:hover { filter:brightness(1.08); }
.report-card button svg { width:14px; height:14px; }
.report-card.generated { border-color:#98a676; background:rgba(242,246,234,.68); }
.report-card.generated button { border-color:#94a373; background:#eef3e6; color:#617443; }
.no-reports { display:grid; place-items:center; align-content:center; min-height:260px; color:#69764f; text-align:center; }
.no-reports strong { font-size:18px; }
.no-reports span { margin-top:4px; color:var(--muted); font-size:10.5px; }

.schedule-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; margin-bottom:12px; }
.schedule-kpi-grid article { display:grid; min-height:96px; padding:13px 15px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.4); }
.schedule-kpi-grid span { color:#5e554d; font-size:9px; text-transform:uppercase; }
.schedule-kpi-grid strong { color:#563b29; font-size:20px; }
.schedule-kpi-grid small { color:var(--muted); font-size:9px; }
.schedule-panel,.schedule-advice { min-height:420px; }
.add-schedule { display:flex; align-items:center; gap:5px; min-height:30px; border:1px solid #dac6b3; border-radius:7px; padding:0 9px; background:#fffaf5; color:#75513e; font-size:9px; font-weight:700; cursor:pointer; }
.add-schedule svg { width:13px; height:13px; }
.schedule-list { display:grid; margin-top:8px; }
.schedule-list article { display:grid; grid-template-columns:39px 1fr 80px 72px; align-items:center; gap:10px; min-height:86px; border-top:1px solid #eee4d9; }
.schedule-list article.paused { opacity:.55; }
.schedule-icon { display:grid; place-items:center; width:35px; height:35px; border-radius:10px; background:#e6ecd9; color:#657847; }
.schedule-icon svg { width:17px; height:17px; }
.schedule-list strong,.schedule-list p,.schedule-list small { display:block; }
.schedule-list strong { font-size:11.5px; }
.schedule-list p { margin:3px 0; color:#625b54; font-size:9px; }
.schedule-list small { color:var(--muted); font-size:8.5px; }
.schedule-list article > b { color:#785846; font-size:9px; }
.schedule-toggle { min-height:28px; border:1px solid #d8c8b8; border-radius:7px; background:#fffaf5; color:#705648; font-size:8.5px; font-weight:700; cursor:pointer; }
.schedule-health { display:flex; justify-content:space-between; align-items:center; margin:auto 0 15px; padding:12px 0; border-top:1px solid rgba(255,255,255,.18); border-bottom:1px solid rgba(255,255,255,.18); }
.schedule-health b { color:#efbd91; font-size:17px; }
.recipients-panel { min-height:185px; }
.recipient-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:18px; }
.recipient-grid > span { display:grid; grid-template-columns:36px 1fr; grid-template-rows:auto auto; align-items:center; column-gap:8px; padding:10px; border:1px solid #e9ded2; border-radius:9px; background:#fffaf5; }
.recipient-grid > span > b { grid-row:1/3; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#e4c38e; color:#4f3b2c; font-size:9px; }
.recipient-grid strong { font-size:10.5px; }
.recipient-grid small { color:var(--muted); font-size:8px; }

.toast { position:fixed; z-index:80; right:22px; bottom:22px; max-width:min(390px,calc(100vw - 30px)); padding:12px 15px; border:1px solid #b9c29f; border-radius:9px; background:#62683d; color:#fff; box-shadow:0 12px 34px rgba(50,52,30,.24); font-size:11px; opacity:0; pointer-events:none; transform:translateY(12px); transition:.2s ease; }
.toast.show { opacity:1; transform:translateY(0); }
.reports-main footer { display:flex; justify-content:space-between; gap:20px; padding:18px 0 1px; color:#827a71; font-size:8.5px; }

@media(max-width:1240px) {
  .reports-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .report-library { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .report-builder { grid-template-columns:1fr 1fr 1fr; }
}
@media(max-width:900px) {
  .back-dashboard,.sync-button span { display:none; }
  .sync-button { width:32px; justify-content:center; padding:0; }
  .reports-toolbar { align-items:stretch; flex-direction:column; }
  .reports-tabs { width:100%; }
  .reports-tab { flex:1; padding-inline:7px; }
  .toolbar-actions { justify-content:flex-end; }
  .reports-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reports-dashboard-grid .performance-panel,.reports-dashboard-grid .reports-insight,.reports-dashboard-grid .channel-panel,.reports-dashboard-grid .status-panel,.reports-dashboard-grid .report-flow-panel,.reports-dashboard-grid .schedule-panel,.reports-dashboard-grid .schedule-advice,.reports-dashboard-grid .recipients-panel { grid-column:span 12; }
  .reports-insight,.schedule-advice { min-height:310px; }
  .report-flow { grid-template-columns:1fr; }
  .report-flow > span { width:100%; max-width:350px; margin:auto; }
  .report-flow > i { transform:rotate(90deg); }
  .report-flow-panel { min-height:440px; }
  .report-library { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .schedule-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .recipient-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:610px) {
  .reports-main .topbar p { font-size:10px; }
  .reports-tabs { display:grid; grid-template-columns:1fr 1fr; }
  .reports-tab { min-height:34px; font-size:9px; }
  .reports-tab:last-child { grid-column:span 2; }
  .reports-tab b { display:none; }
  .toolbar-actions { justify-content:space-between; }
  .toolbar-actions label { flex:1; }
  .toolbar-actions select { width:100%; }
  .toolbar-actions button { width:36px; padding:0; justify-content:center; font-size:0; }
  .report-builder { grid-template-columns:1fr; }
  .reports-kpi-grid,.schedule-kpi-grid { grid-template-columns:1fr; }
  .reports-kpi-grid .kpi-card { height:108px; padding:13px 15px; }
  .reports-kpi-grid .kpi-card > strong { margin-top:6px; }
  .reports-kpi-grid .kpi-meta { margin-top:7px; }
  .performance-panel { min-height:330px; }
  .report-chart { grid-template-columns:35px; height:250px; }
  .report-month { width:36px; gap:3px; }
  .report-bar { width:12px; }
  .report-legend { display:none; }
  .channel-table > div { grid-template-columns:1.2fr .8fr .55fr; }
  .channel-table > div > :nth-child(3) { display:none; }
  .library-tools { grid-template-columns:1fr; }
  .report-library { grid-template-columns:1fr; }
  .schedule-list article { grid-template-columns:35px 1fr auto; min-height:112px; }
  .schedule-list article > b { grid-column:2; }
  .schedule-toggle { grid-column:3; grid-row:1/3; }
  .recipient-grid { grid-template-columns:1fr; }
  .reports-main footer { flex-direction:column; gap:4px; }
}
