/* RESTOM X REPORT VISUAL V1 | Presentation only; no API/finance logic changes. */
#reportsView { --rx-border:rgba(132,151,182,.17); --rx-shadow:0 8px 24px rgba(20,40,78,.065); --rx-purple:#5754e9; --rx-ink:var(--text-main,#16243b); color:var(--rx-ink); }
#reportsView .report-header { gap:14px!important; align-items:center!important; margin-bottom:17px!important; }
#reportsView .report-header h2 { font-size:clamp(24px,2.2vw,31px);font-weight:900;letter-spacing:-.055em!important; }
#reportsView .report-header p {line-height:1.55}
#reportsView .report-header-actions {gap:10px!important}
#reportsView .report-header-actions .btn { min-height:46px; border-radius:15px; display:inline-flex;align-items:center;justify-content:center; gap:9px;box-shadow:0 3px 12px rgba(24,45,82,.045);font-weight:800;letter-spacing:-.01em; }
#reportsView .report-header-actions .btn:last-child { background:linear-gradient(125deg,#5e62f6,#514de4)!important;color:#fff!important;border-color:transparent;box-shadow:0 8px 21px rgba(87,84,233,.19); }
#reportsView #tabGunluk,#reportsView #tabZGecmis,#reportsView #tabAylik {border:1px solid var(--rx-border);border-radius:13px!important;padding:13px 14px;min-height:48px;line-height:1.2;transition:background-color .15s ease,box-shadow .15s ease;}
#reportsView .tab-pill.active {background:linear-gradient(120deg,#6264f5,#5050e5)!important;box-shadow:0 5px 15px rgba(86,84,231,.17)!important;color:#fff!important;border-color:transparent!important;}
/* Existing 4 server-calculated cards: Net Sales hero, followed by 3 small cards. */
#reportsView #reportOverviewCards {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:13px!important;margin-bottom:21px!important;}
#reportsView #reportOverviewCards > .premium-card {min-width:0!important;position:relative;overflow:hidden;isolation:isolate;margin:0!important;padding:20px 21px!important;background:var(--sidebar-bg,#fff);border:1px solid var(--rx-border);border-radius:21px!important;box-shadow:var(--rx-shadow)!important;}
#reportsView #reportOverviewCards > .premium-card > div:first-child {font-size:12px!important;letter-spacing:.025em!important;text-transform:none!important;font-weight:800!important;line-height:1.45}
#reportsView #reportOverviewCards > .premium-card > div:nth-child(2) {font-size:clamp(21px,2.1vw,30px)!important;line-height:1.18;font-weight:900!important;letter-spacing:-.045em;margin-top:13px!important;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}
#reportsView #reportOverviewCards > .premium-card:first-child {grid-column:1/-1;background:linear-gradient(118deg,#2f309c 0%,#4447c5 51%,#5b57ed 100%)!important;padding:26px 26px 30px!important;border:1px solid rgba(255,255,255,.12)!important;box-shadow:0 16px 36px rgba(49,52,163,.18)!important;min-height:158px;}
#reportsView #reportOverviewCards > .premium-card:first-child::before {content:"";position:absolute;width:260px;height:260px;right:-90px;bottom:-150px;border:42px solid rgba(255,255,255,.07);border-radius:50%;z-index:-1;pointer-events:none;}
#reportsView #reportOverviewCards > .premium-card:first-child::after {content:"";position:absolute;width:280px;height:130px;right:8%;top:-94px;background:radial-gradient(ellipse,rgba(255,255,255,.17),transparent 70%);border-radius:50%;pointer-events:none;}
#reportsView #reportOverviewCards > .premium-card:first-child > div {color:#fff!important;}
#reportsView #reportOverviewCards > .premium-card:first-child > div:first-child {color:#e7e9ff!important;font-size:14px!important;text-transform:none!important;}
#reportsView #reportOverviewCards > .premium-card:first-child > div:nth-child(2) {font-size:clamp(35px,5vw,48px)!important;margin-top:17px!important;color:#fff!important;letter-spacing:-.045em;}
#reportsView #reportOverviewCards > .premium-card:nth-child(2){border-top:3px solid #3478ed}
#reportsView #reportOverviewCards > .premium-card:nth-child(3){border-top:3px solid #f0a12d}
#reportsView #reportOverviewCards > .premium-card:nth-child(4){border-top:3px solid #e25b64}
/* X view only. Flatten the legacy left/right columns while keeping content and print DOM intact. */
#reportsView #reportSummary .xr-container {min-width:0;max-width:100%;}
#reportsView #reportSummary .xr-title {display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin:7px 3px 15px;}
#reportsView #reportSummary .xr-title h3 {font-size:17px;font-weight:900;letter-spacing:-.025em;margin:0;}
#reportsView #reportSummary .xr-date {display:inline-flex;align-items:center;min-height:32px;background:rgba(100,110,235,.09);color:var(--rx-purple);font-weight:800;border-radius:11px;padding:6px 11px;}
#reportsView #reportSummary .xr-grid {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px!important;align-items:start!important;}
#reportsView #reportSummary .xr-grid > .xr-col {display:contents!important;}
#reportsView #reportSummary .xr-grid .xr-card {min-width:0!important;margin:0!important;position:relative;box-sizing:border-box;background:var(--sidebar-bg,#fff);padding:20px!important;border:1px solid var(--rx-border);border-radius:21px!important;box-shadow:var(--rx-shadow)!important;overflow:hidden;}
#reportsView #reportSummary .xr-card.rx-full {grid-column:1/-1;}
#reportsView #reportSummary .xr-card.rx-payments {order:1;grid-column:1/-1;}
#reportsView #reportSummary .xr-card.rx-products {order:2;}
#reportsView #reportSummary .xr-card.rx-expenses {order:3;}
#reportsView #reportSummary .xr-card.rx-status {order:4;}
#reportsView #reportSummary .xr-card.rx-overview {order:5;}
#reportsView #reportSummary .xr-card.rx-allorders {order:6;grid-column:1/-1;}
#reportsView #reportSummary .xr-card.rx-exceptions {order:99;grid-column:1/-1;}
#reportsView #reportSummary .xr-card-title {font-size:15px;line-height:1.35;letter-spacing:-.025em;font-weight:900;border:0!important;padding:0 0 13px!important;margin-bottom:12px!important;display:flex;align-items:center;gap:8px;}
#reportsView #reportSummary .xr-card-title::before {content:"";display:inline-block;width:10px;height:10px;border-radius:4px;background:#6a66f2;flex:0 0 10px;box-shadow:0 0 0 5px rgba(98,100,245,.085);margin:0 8px 0 3px;}
#reportsView #reportSummary .rx-expenses .xr-card-title::before{background:#f66c70;box-shadow:0 0 0 5px rgba(246,108,112,.10)}
#reportsView #reportSummary .rx-exceptions .xr-card-title::before{background:#fd922f;box-shadow:0 0 0 5px rgba(253,146,47,.10)}
#reportsView #reportSummary .rx-products .xr-card-title::before{background:#2f82ed;box-shadow:0 0 0 5px rgba(47,130,237,.10)}
#reportsView #reportSummary .xr-badge {border-radius:999px;padding:4px 9px;font-size:11px}
#reportsView #reportSummary .xr-table{width:100%;border-collapse:collapse;}
#reportsView #reportSummary .xr-table th{color:var(--text-muted,#64748b);font-weight:800;font-size:11px;text-transform:none;background:rgba(135,155,190,.055);}
#reportsView #reportSummary .xr-table :is(td,th){padding:10px 8px;border-bottom:1px solid rgba(135,155,190,.11);vertical-align:top;}
#reportsView #reportSummary .xr-table tbody tr:last-child td{border-bottom:none;}
#reportsView #reportSummary .xr-table .xr-right{text-align:right!important;white-space:nowrap;font-variant-numeric:tabular-nums;}
#reportsView #reportSummary .xr-table-scroll{max-width:100%;overflow:auto;scrollbar-width:thin;}
#reportsView #reportSummary .xr-row-highlight{background:rgba(80,84,232,.055);}
#reportsView #reportSummary .xr-row-highlight td{font-weight:800;color:var(--rx-purple)}
/* Turn current payment rows into responsive method tiles without changing figures. */
#reportsView #reportSummary .rx-payments .xr-table thead {display:none!important;}
#reportsView #reportSummary .rx-payments .xr-table tbody {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;}
#reportsView #reportSummary .rx-payments .xr-table tbody tr {min-width:0;display:flex!important;flex-direction:column;gap:7px;align-items:flex-start;padding:14px 13px;border:1px solid rgba(137,153,191,.16);border-radius:15px;background:rgba(148,163,184,.045);}
#reportsView #reportSummary .rx-payments .xr-table tbody tr td {border:0!important;padding:0!important;text-align:left!important;width:100%;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere;}
#reportsView #reportSummary .rx-payments .xr-table tbody tr td:first-child{font-size:12px;font-weight:750;color:var(--text-muted,#64748b)}
#reportsView #reportSummary .rx-payments .xr-table tbody tr td:last-child{font-size:clamp(13px,1.38vw,19px);font-weight:900;color:var(--rx-ink);letter-spacing:-.035em;white-space:nowrap!important;}
#reportsView #reportSummary .rx-payments .xr-table tbody tr.rx-payment-empty{grid-column:1/-1}
#reportsView #reportSummary .rx-payments tr.rx-method-cash{background:rgba(19,170,116,.07)!important}
#reportsView #reportSummary .rx-payments tr.rx-method-card{background:rgba(244,78,91,.06)!important}
#reportsView #reportSummary .rx-payments tr.rx-method-meal{background:rgba(40,133,234,.07)!important}
/* Exception amounts are read from the same X-report table, not recomputed. */
#reportsView #reportSummary .rx-exception-strip {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 0 18px;}
#reportsView #reportSummary .rx-exception-item {padding:17px 15px;display:flex;flex-direction:column;gap:9px;min-width:0;border-radius:15px;background:rgba(148,163,184,.045);border:1px solid rgba(148,163,184,.15);}
#reportsView #reportSummary .rx-exception-item .rx-exception-name {font-size:12px;color:var(--text-muted,#64748b);font-weight:800}
#reportsView #reportSummary .rx-exception-item .rx-exception-amount {font-weight:900;font-size:clamp(17px,2vw,25px);font-variant-numeric:tabular-nums;letter-spacing:-.04em;overflow-wrap:anywhere}
#reportsView #reportSummary .rx-exception-item.rx-cancel .rx-exception-amount{color:#db4252}
#reportsView #reportSummary .rx-exception-item.rx-gift .rx-exception-amount{color:#814de2}
#reportsView #reportSummary .rx-exception-item.rx-discount .rx-exception-amount{color:#e88322}
#reportsView #reportSummary .rx-overview tr.rx-summary-exception-row{display:none!important;}
#reportsView #reportSummary .rx-exceptions .restom-cancel-reason{font-size:11px;line-height:1.5;color:var(--text-muted,#64748b)}
#reportsView #reportSummary .rx-exceptions .restom-cancel-table tr.restom-cancel-row{background:rgba(148,163,184,.03)}
/* Shorter phones: prevent horizontal page overflow. */
@media (max-width:980px){
 #reportsView #reportSummary .xr-grid{grid-template-columns:minmax(0,1fr)!important}
 #reportsView #reportSummary .xr-grid .xr-card{grid-column:1/-1!important}
 #reportsView #reportSummary .rx-payments .xr-table tbody{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 #reportsView{max-width:100%;min-width:0}
 #reportsView #reportOverviewCards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important}
 #reportsView #reportOverviewCards>.premium-card{padding:16px!important;border-radius:17px!important}
 #reportsView #reportOverviewCards>.premium-card:first-child{padding:23px!important;min-height:140px}
 #reportsView #reportOverviewCards>.premium-card>div:nth-child(2){font-size:clamp(20px,5.3vw,27px)!important}
 #reportsView #reportOverviewCards>.premium-card:first-child>div:nth-child(2){font-size:clamp(31px,9vw,43px)!important}
 #reportsView #reportOverviewCards>.premium-card:nth-child(4){grid-column:1/-1}
 #reportsView .report-header-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%}
 #reportsView .report-header-actions .btn{min-width:0!important;width:100%;padding:12px 8px!important;font-size:12px!important;white-space:normal;line-height:1.3;}
 #reportsView #tabGunluk,#reportsView #tabZGecmis,#reportsView #tabAylik{font-size:11px!important;min-width:0!important;padding:11px 5px!important;white-space:normal!important;}
 #reportsView #reportSummary .xr-grid{gap:12px!important}
 #reportsView #reportSummary .xr-grid .xr-card{padding:16px!important;border-radius:17px!important}
 #reportsView #reportSummary .rx-exception-strip{grid-template-columns:1fr;gap:8px}
 #reportsView #reportSummary .rx-exception-item{flex-direction:row;justify-content:space-between;align-items:center;gap:10px;padding:13px 14px}
 #reportsView #reportSummary .rx-exception-item .rx-exception-amount{font-size:20px;white-space:nowrap}
 #reportsView #reportSummary .xr-table td,#reportsView #reportSummary .xr-table th{font-size:11px;padding:9px 6px}
 #reportsView #reportSummary .rx-payments .xr-table tbody tr{padding:13px 11px}
}
@media(max-width:375px){
 #reportsView #reportOverviewCards{grid-template-columns:minmax(0,1fr)!important}
 #reportsView #reportOverviewCards>.premium-card{grid-column:1/-1!important}
 #reportsView #reportSummary .rx-payments .xr-table tbody{grid-template-columns:minmax(0,1fr)}
}
/* Remain legible in dark theme; the purple hero is intentionally constant. */
.dark-mode #reportsView .rx-payments .xr-table tbody tr,.dark-mode #reportsView .rx-exception-item{border-color:rgba(170,190,220,.16)}
/* Printed report retains all original records and is not restyled by this file: its existing iframe has its own CSS. */
