:root{
  --bg:#f4f7fb;--panel:#fff;--line:#dbe5f1;--line2:#edf2f8;--text:#12325f;--muted:#7590b7;
  --blue:#3e7bdb;--blue2:#5f94e5;--green:#2fb56f;--green2:#7ad453;--red:#e25563;--shadow:0 18px 45px rgba(31,61,111,.08);
  --radius:22px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
a{color:#356ad4;text-decoration:none}
a:hover{text-decoration:underline}
button,input,select{font:inherit}
.shell{max-width:1880px;margin:0 auto;padding:18px 14px 32px}
.header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}
.brand{display:flex;gap:16px;align-items:center}
.brandmark{width:70px;height:70px;border-radius:20px;background:linear-gradient(135deg,#1d4987,#2f5fa8);display:grid;place-items:center;color:#fff;font-size:40px;font-weight:800;box-shadow:var(--shadow)}
.brandmark span{color:#7fc0ff}
.eyebrow{font-size:12px;letter-spacing:.18em;font-weight:800;color:#7f93b6}
.header h1,.section-head h2{margin:0;font-size:20px;line-height:1.2}
.header h1 span{color:var(--blue)}
.header p,.section-head p,.section-note,.footnote,footer,.live-next,#message,.platform-amount-label,.platform-known{color:var(--muted)}
.head-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.back,.nav-active,.ghost,.secondary,.primary{display:inline-flex;align-items:center;justify-content:center;border-radius:14px;padding:12px 16px;border:1px solid transparent;font-weight:700}
.back,.nav-active,.ghost,.secondary{background:#fff;border-color:var(--line);color:#2b5cac}
.nav-active{background:#eef4ff}
.primary{background:#2e5fa8;color:#fff;box-shadow:0 12px 25px rgba(46,95,168,.28)}
.primary[aria-busy="true"]{opacity:.9}
.meta{display:flex;gap:18px;flex-wrap:wrap;align-items:center;margin-bottom:18px;color:#6884ac;font-size:14px}
.meta-grid{justify-content:space-between}
.online,.pill-note,.reload-status,.live-badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px}
.online i,.live-badge i{width:10px;height:10px;border-radius:50%;background:#3fda84;box-shadow:0 0 0 4px rgba(63,218,132,.17)}
.pill-note{padding:8px 12px;background:#edf3fb}
.reload-status{min-height:20px}
.live-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.live-toggle{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font-weight:700}
.live-toggle input{position:absolute;opacity:0;pointer-events:none}
.switch{width:48px;height:28px;border-radius:999px;background:#d9e3f3;position:relative;transition:.25s}
.switch::after{content:"";position:absolute;top:4px;left:4px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.12);transition:.25s}
.live-toggle input:checked + .switch{background:#3ecf78}
.live-toggle input:checked + .switch::after{left:24px}
.live-badge{padding:9px 12px;background:#eef4ef;border:1px solid #d7ecda;color:#24724b}
.live-badge.active{background:#eaf9ef;border-color:#beeac9}
.live-badge i.blink{animation:blinkPulse 1.2s infinite}
.live-label{color:#17345f}
@keyframes blinkPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.86)}}
.panel{background:var(--panel);border:1px solid var(--line2);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px 22px;margin-bottom:16px}
.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:16px}
.filters{display:grid;grid-template-columns:2.1fr 1fr 1fr 1fr 1fr 1fr;gap:12px;align-items:end}
.field{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:700;color:#5f79a0}
.field input,.field select{width:100%;padding:13px 14px;border-radius:14px;border:1px solid var(--line);background:#fbfdff;color:#17345f;outline:none}
.field input:focus,.field select:focus{border-color:#80a5e7;box-shadow:0 0 0 4px rgba(105,152,236,.15)}
.search{grid-column:auto}
.sales-widgets,.platform-cards{display:grid;grid-template-columns:repeat(5,minmax(220px,1fr));gap:16px}
.sales-widget,.platform-card{background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid var(--line2);border-radius:24px;padding:18px 18px 16px;min-height:220px;box-shadow:0 10px 26px rgba(40,72,130,.06)}
.sales-widget{display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.sales-widget::before{content:"";position:absolute;left:0;right:0;top:0;height:5px;background:#dbe6f7}
.sales-widget.accent-general::before{background:linear-gradient(90deg,#5d8de0,#8ab5ff)}
.sales-widget.accent-eur::before{background:linear-gradient(90deg,#3f7ddc,#5fa0ff)}
.sales-widget.accent-czk::before{background:linear-gradient(90deg,#6dbf42,#93d85f)}
.sales-widget.accent-try::before{background:linear-gradient(90deg,#ff9151,#ffc17b)}
.sales-kicker{font-size:12px;letter-spacing:.12em;font-weight:800;color:#7f93b6}
.sales-value{font-size:22px;font-weight:800;line-height:1.25;margin-top:8px;color:#0f3268}
.sales-sub{font-size:14px;color:#6b88b0;margin-top:4px}
.sales-amount-block{padding-top:12px;border-top:1px solid var(--line);margin-top:16px}
.sales-amount-label{display:block;font-size:12px;letter-spacing:.08em;font-weight:800;color:#8093b5;margin-bottom:6px}
.sales-money{font-size:18px;font-weight:800;color:#11366c}
.sales-stats{margin-top:14px;padding-top:10px;border-top:1px solid var(--line2);display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#6e89af}
.platform-card{min-height:unset;padding:16px 18px}
.platform-card-top{display:flex;gap:14px;align-items:center;margin-bottom:14px}
.platform-name{display:block;font-size:15px;font-weight:800;color:#526c95}
.platform-card b{display:block;font-size:20px;color:#0f3268;margin-top:2px}
.platform-card small{display:block;margin-top:2px;color:#87a0c4}
.platform-amount-value{font-size:16px;font-weight:800;color:#14356a}
.platform-known{margin-top:10px;font-size:13px}
.platform-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;flex:0 0 48px;background:#f1f5fb}
.platform-icon svg{width:30px;height:30px;display:block}
.platform-icon.amazon{background:#f8edd8}.platform-icon.shopify{background:#ebf5df}.platform-icon.kaufland{background:#fde8ea}.platform-icon.manual{background:#eef2f8}
.summary-table-wrap,.table-scroll{overflow:auto;border:1px solid var(--line2);border-radius:20px;background:#fcfdff}
table{width:100%;border-collapse:collapse}
th,td{padding:16px 18px;border-bottom:1px solid var(--line2);text-align:left;vertical-align:top}
th{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#7f93b6;background:#f7faff}
.platform-inline{display:flex;align-items:center;gap:10px;font-weight:700}
#message{min-height:20px;margin:0 0 12px}
.orderid{font-weight:800;color:#17345f}
.orders-table small,.summary-table small{display:block;color:#8098bc;margin-top:5px}
details summary{cursor:pointer;color:#356ad4;margin-top:6px} details ul{margin:8px 0 0 18px;padding:0}
.money{font-weight:800;color:#14356a}.money.missing{color:#8ea5c6}
.tag{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:#e9f2ff;color:#2d67bf;margin:0 6px 6px 0}
.tag.shipped,.tag.delivered{background:#e9f8ef;color:#1f8d54}.tag.cancelled,.tag.canceled,.tag.returned{background:#ffeff1;color:#d1495d}.tag.allocated,.tag.processing,.tag.picked,.tag.packed{background:#fff3e8;color:#dd7e2d}.tag.hold{background:#f1eefc;color:#6959c7}
.table-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.perpage{display:flex;align-items:center;gap:8px;color:#6e87aa;font-weight:700}.perpage select{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#fff}
.pager{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;color:#6f88ae}.pager>div{display:flex;gap:10px}.pager button{padding:11px 14px;border-radius:12px;border:1px solid var(--line);background:#fff;color:#254f97;font-weight:700}
footer{padding:8px 2px 0;font-size:13px}
.loading-spinner{display:inline-block;width:15px;height:15px;border:2px solid rgba(255,255,255,.38);border-top-color:#fff;border-radius:50%;animation:spin 1s linear infinite;vertical-align:-2px}
@keyframes spin{to{transform:rotate(360deg)}}
.skeleton{pointer-events:none}.skeleton-line{height:12px;border-radius:999px;background:linear-gradient(90deg,#eef3fa,#e3ebf7,#eef3fa);background-size:240px 100%;animation:shimmer 1.4s linear infinite;margin-bottom:10px}.skeleton-line.big{height:28px;margin-top:18px}.w35{width:35%}.w40{width:40%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w75{width:75%}@keyframes shimmer{0%{background-position:-240px 0}100%{background-position:240px 0}}

@media (max-width:1400px){.sales-widgets,.platform-cards{grid-template-columns:repeat(3,minmax(240px,1fr))}.filters{grid-template-columns:1.7fr repeat(5,1fr)}}
@media (max-width:980px){.header,.section-head,.meta-grid{flex-direction:column;align-items:flex-start}.filters,.sales-widgets,.platform-cards{grid-template-columns:1fr 1fr}.head-actions,.live-tools{justify-content:flex-start}}
@media (max-width:640px){.shell{padding:12px}.filters,.sales-widgets,.platform-cards{grid-template-columns:1fr}.panel{padding:16px}.brand{align-items:flex-start}.brandmark{width:58px;height:58px;font-size:34px}}

/* v4.2 iyileştirmeleri: okunabilirlik ve canlı durum */
.live-badge:not(.active) i{background:#aebacb;box-shadow:none}
.live-badge.active i.blink{background:#1bb869;box-shadow:0 0 0 4px rgba(27,184,105,.14)}
.live-toggle input:focus-visible + .switch{outline:3px solid #3976ca;outline-offset:3px}
.sales-widgets{grid-template-columns:repeat(3,minmax(220px,1fr))}
.sales-widget{min-height:188px}
.sales-value{overflow-wrap:anywhere}
@media (max-width:980px){.sales-widgets{grid-template-columns:repeat(2,minmax(220px,1fr))}}
@media (max-width:640px){.sales-widgets{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.live-badge i.blink,.loading-spinner,.skeleton-line{animation:none}}


/* Source-of-truth provenance is visible without an extra API request. */
.source-indicator{display:flex;gap:8px 15px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:10px 0 15px;padding:10px 13px;background:#f5f6fc;border:1px solid #e1e4ef;border-radius:12px;color:#64748b;font-size:11px;line-height:1.6}
.source-indicator span{flex:1 1 420px}
.source-indicator a{color:#6d4e98;font-weight:800;text-decoration:none;white-space:normal}
.source-indicator a:hover{text-decoration:underline}


/* Executive-first orders dashboard: advanced platform audit is optional. */
.orders-advanced{margin:12px 0 17px;border:1px solid #e6e4ef;border-radius:16px;
 background:#fff;overflow:hidden}
.orders-advanced>summary{list-style:none;cursor:pointer;padding:15px 18px;
 color:#645776;background:#faf9fe;font-size:12px;font-weight:830;
 display:flex;align-items:center;justify-content:space-between;gap:12px}
.orders-advanced>summary:hover{background:#f5f1fc}
.orders-advanced>summary::-webkit-details-marker{display:none}
.orders-advanced>summary:after{content:'▾';color:#9a88aa}
.orders-advanced[open]>summary:after{content:'▴'}
.orders-advanced[open]>summary{border-bottom:1px solid #ece9f3}
.orders-advanced .orders-chart-host{margin:12px}
.orders-advanced .panel.platforms{margin:12px;border:1px solid #eceaf2;box-shadow:none}
.orders-advanced .panel.platforms .section-head{margin-bottom:10px}
.compact-source-details{margin:0 0 12px}
.compact-source-details>summary{padding:5px 10px;color:#858198;cursor:pointer;
 font-size:10px;font-weight:850;list-style:none}
.compact-source-details>summary:before{content:'ⓘ ';color:#9165b3}
.compact-source-details>summary::-webkit-details-marker{display:none}
.compact-source-details .source-indicator{margin:4px 0 9px}
@media(max-width:690px){.orders-advanced .panel.platforms,.orders-advanced .orders-chart-host{margin:8px}}


/* Full-width compact orders table; keep scrolling within the table on narrow screens. */
.list-panel{min-width:0}
.list-panel .table-scroll{max-width:100%;overflow-x:auto}
.list-panel .orders-table{table-layout:fixed;width:100%;min-width:0}
.list-panel .orders-table th{font-size:10px;letter-spacing:0;line-height:1.2;white-space:normal;overflow-wrap:break-word;padding:10px 8px}
.list-panel .orders-table td{font-size:11px;overflow-wrap:anywhere;padding:10px 8px}
.list-panel .orders-table th:nth-child(1){width:12%}
.list-panel .orders-table th:nth-child(2){width:17%}
.list-panel .orders-table th:nth-child(3){width:12%}
.list-panel .orders-table th:nth-child(4){width:14%}
.list-panel .orders-table th:nth-child(5){width:25%}
.list-panel .orders-table th:nth-child(6){width:10%}
.list-panel .orders-table th:nth-child(7){width:10%}
.list-panel .orders-table details li{overflow-wrap:anywhere;margin:5px 0}
@media(max-width:800px){.list-panel .orders-table{min-width:760px}}
