:root {
  color-scheme: light;
  font-family: "Inter","Aptos","Segoe UI",Arial,sans-serif;
  font-size: 16px;
  --ink: #172139;
  --muted: #56647a;
  --fine: #dbe1eb;
  --page: #f6f8fb;
  --blue: #264acf;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #4775fa; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .46; }
a { color: var(--blue); }
i[data-icon], .ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico { width: 1.15rem; height: 1.15rem; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.m365-login { max-width: 30rem; margin: 14vh auto 0; padding: 2rem; background: white; border: 1px solid var(--fine); border-radius: 1rem; }
.m365-login img { width: 9rem; height: auto; }
.m365-login h1 { margin: 1.5rem 0 .75rem; font-size: 2rem; }
.m365-login p { margin: 0 0 1.25rem; }
.m365-login a { display: inline-block; padding: .75rem 1rem; border-radius: .5rem; background: var(--blue); color: white; text-decoration: none; }
.wall .m365-account { display: none; }
.skip, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 20; width: auto; height: auto; clip-path: none; padding: 1rem; color: white; background: var(--blue); }
.mast { border-bottom: 1px solid var(--fine); background: #fff; }
.mast-inner, main { max-width: 1760px; width: calc(100% - clamp(2rem, 7vw, 7rem)); margin: 0 auto; }
.mast-inner { height: 72px; display: flex; align-items: center; gap: clamp(1.8rem,4vw,4.5rem); }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; }
.brand-logo { display: block; width: 9rem; height: auto; }
.main-nav { display: flex; align-self: stretch; gap: clamp(.8rem,2vw,2rem); }
.main-nav a { display: flex; align-items: center; gap: .5rem; padding: 2px .2rem 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: .94rem; font-weight: 630; text-decoration: none; }
.main-nav a[aria-current=page] { color: var(--blue); border-color: var(--blue); }
.main-nav a:hover { color: var(--blue); }
.wall-button { display: inline-flex; align-items: center; gap: .55rem; margin-left: auto; padding: .61rem .9rem; border: 1px solid #18253f; border-radius: 9px; background: #1a2741; color: #fff; font-weight: 620; font-size: .91rem; white-space: nowrap; }
.wall-button:hover { background: #2e4263; }
main { padding: clamp(1.5rem,3vw,3.2rem) 0 1rem; }
.title-row, .context, .panel-head, .panel-heading, .panel-foot, .dialog-head { display: flex; align-items: center; }
.title-row, .context, .panel-head, .panel-foot, .dialog-head { justify-content: space-between; gap: 1rem; }
.today { display: flex; align-items: center; gap: .48rem; color: var(--muted); font-size: .93rem; font-weight: 540; }
.today .ico { width: 16px; height: 16px; }
.today span:first-letter { text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: .3rem; font-size: clamp(2.3rem,3.55vw,3.85rem); font-weight: 720; letter-spacing: -.063em; line-height: 1.13; }
.clock { display: flex; align-items: center; gap: .7rem; font-size: clamp(1.15rem,1.65vw,1.7rem); font-weight: 550; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.clock .ico { color: #66748c; }
.context { margin: 1.4rem 0 1.1rem; flex-wrap: wrap; }
.mode-switch { display: inline-flex; align-items: center; gap: 2px; background: #e8ecf3; border: 1px solid #e0e5ee; border-radius: 10px; padding: 3px; }
.mode-switch button { display: inline-flex; align-items: center; justify-content: center; gap: .43rem; background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 7px; padding: .43rem .7rem; font-size: .88rem; font-weight: 600; line-height: 1.2; }
.mode-switch button[aria-pressed=true] { color: var(--ink); border-color: #d6ddeb; background: white; box-shadow: 0 1px 3px #1824380c; }
.mode-switch button[data-mode=demo][aria-pressed=true] { color: #775208; background: #fff9e9; border-color: #eddbae; }
.mode-switch .ico { width: 1rem; height: 1rem; }
.sync-line { display: flex; align-items: center; gap: .56rem; font-size: .88rem; color: var(--muted); }
.dot { display: inline-block; border-radius: 50%; width: .53rem; height: .53rem; background: #788598; flex: none; }
.dot.ok { background: #198066; }
.dot.warn { background: #d28819; }
.dot.demo { background: #bf8a22; }
.icon-button, .pager button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--fine); border-radius: 8px; color: var(--muted); background: #fff; width: 2.05rem; height: 2.05rem; }
.icon-button:hover, .pager button:not(:disabled):hover { border-color: #8da0c1; color: var(--blue); }
.sync-line .icon-button { width: 1.9rem; height: 1.9rem; }
.sync-line .ico { width: .94rem; height: .94rem; }
.sync-line .link-button { margin-left: .13rem; }
.link-button { display: inline-flex; align-items: center; gap: .38rem; font-weight: 610; color: var(--blue); background: none; border: 0; text-decoration: none; padding: .17rem 0; }
.link-button:hover { text-decoration: underline; }
.notice { display: flex; align-items: center; gap: .54rem; padding: .66rem .9rem; border: 1px solid #e9dcb4; border-radius: 10px; background: #fff9ea; color: #715313; font-size: .91rem; margin: 0 0 1rem; }
.notice .ico { width: 1.05rem; height: 1.05rem; }
.stage-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.45rem; }
.stage-grid.ship { grid-template-columns: repeat(3,minmax(0,1fr)); }
.tone-new { --accent: #2e55c9; --wash: #e8efff; --line: #9bb5ff; --glyph: #335ad4; }
.tone-entered { --accent: #6545ae; --wash: #f0eafa; --line: #c3afea; --glyph: #7957ba; }
.tone-confirmed { --accent: #9c5308; --wash: #fff0d8; --line: #f1bf74; --glyph: #b65e05; }
.tone-invoiced, .tone-delivered { --accent: #146854; --wash: #dff4eb; --line: #86cbb0; --glyph: #218164; }
.tone-gls { --accent: #3256a4; --wash: #e7effd; --line: #9eb8ed; --glyph: #395d9d; }
.tone-medika { --accent: #6f4890; --wash: #f1eaf7; --line: #c4a0db; --glyph: #86539c; }
.stage-card { position: relative; isolation: isolate; text-align: left; min-height: 143px; overflow: hidden; padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .8rem; background: #fff; border: 1px solid var(--fine); border-radius: var(--radius); color: var(--ink); }
.stage-card::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--line); }
.stage-card:hover { border-color: var(--line); background: color-mix(in srgb,var(--wash) 22%,white); }
.stage-card[aria-pressed=true] { background: color-mix(in srgb,var(--wash) 45%,white); outline: 2px solid var(--glyph); outline-offset: -2px; }
.card-top { display: flex; align-items: center; gap: .7rem; font-size: 1rem; font-weight: 660; line-height: 1.23; letter-spacing: -.018em; }
.stage-icon, .doc-icon { width: 2.35rem; height: 2.35rem; border-radius: .73rem; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--wash); color: var(--glyph); }
.stage-icon .ico { width: 1.22rem; height: 1.22rem; }
.card-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: auto; }
.stage-value { font-size: clamp(2.25rem,3vw,3.4rem); font-weight: 650; line-height: .98; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.stage-source { color: var(--muted); font-size: .84rem; }
.panel { background: #fff; border: 1px solid var(--fine); border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: 1rem 1.3rem; min-height: 72px; }
.panel-heading { gap: .6rem; }
h2 { font-size: clamp(1.11rem,1.45vw,1.48rem); letter-spacing: -.042em; font-weight: 690; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8em; padding: .14rem .42rem; border-radius: 6px; background: #edf0f6; color: #435068; font-size: .86rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.search-wrap { display: flex; align-items: center; gap: .48rem; padding: .45rem .7rem; border: 1px solid var(--fine); border-radius: 8px; color: #6b7890; }
.search-wrap .ico { width: 1rem; height: 1rem; }
.search-wrap:focus-within { outline: 2px solid #9caeec; }
.search-wrap input { width: 9.9rem; max-width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .88rem; }
.search-wrap input:focus-visible { outline: 0; }
input::placeholder { color: #637086; opacity: 1; }
#filter-line { padding: 0 1.3rem .8rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--fine); border-radius: 50px; background: #f7f8fc; padding: .27rem .6rem; font-size: .85rem; color: var(--muted); }
.filter-chip .ico { width: .9rem; height: .9rem; }
table { width: 100%; border-collapse: collapse; }
th { padding: .65rem 1.3rem; border-top: 1px solid #e4e8f0; border-bottom: 1px solid #e4e8f0; background: #f7f8fb; color: #58667b; text-align: left; font-size: .84rem; font-weight: 590; }
td { padding: .87rem 1.3rem; border-bottom: 1px solid #e8ecf2; line-height: 1.35; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faff; }
.orders-table { table-layout: fixed; }
.orders-table th:nth-child(1) { width: 20%; }
.orders-table th:nth-child(2) { width: 30%; }
.orders-table th:nth-child(3) { width: 29%; }
.orders-table th:nth-child(4) { width: 21%; }
.ref-button { background: none; border: none; color: #254994; padding: .14rem 0; font-family: "Cascadia Mono","Consolas",monospace; font-size: .94rem; font-weight: 630; text-align: left; overflow-wrap: anywhere; }
.ref-button:hover { text-decoration: underline; }
.customer { font-weight: 555; }
.status { display: inline-flex; align-items: center; gap: .42rem; padding: .22rem .55rem; border-radius: 6px; background: var(--wash); color: var(--accent); font-size: .88rem; font-weight: 620; line-height: 1.3; }
.status .ico { width: .95rem; height: .95rem; }
.time-cell { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.panel-foot { border-top: 1px solid var(--fine); padding: .72rem 1.3rem; min-height: 47px; color: var(--muted); font-size: .84rem; }
.pager { display: inline-flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager .ico { width: 1rem; height: 1rem; }
.empty { min-height: 168px; display: grid; align-content: center; justify-items: center; gap: .35rem; padding: 1.5rem 1rem; text-align: center; }
.empty-icon { color: #54729e; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border: 1px solid #dbe5f1; border-radius: .9rem; background: #eef3fa; margin-bottom: .2rem; }
.empty-icon .ico { width: 1.45rem; height: 1.45rem; }
.empty strong { font-size: 1.06rem; font-weight: 650; }
.empty p, .source-card p { color: var(--muted); font-size: .94rem; line-height: 1.5; }
.empty p { max-width: 54ch; }
.auxiliary { margin-top: 1rem; }
.doc-summary { padding: .94rem 1.3rem; list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem; }
.doc-summary::-webkit-details-marker { display: none; }
.doc-summary .end { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
details[open] .doc-summary .chevron { transform: rotate(180deg); }
.doc-icon { width: 2.15rem; height: 2.15rem; background: #eff2f7; color: #55637c; }
.doc-summary strong { font-size: .99rem; font-weight: 625; }
.doc-copy { margin: 0 1.3rem .75rem; color: var(--muted); font-size: .91rem; }
.doc-list { list-style: none; margin: 0; padding: 0 1.3rem; }
.doc-list li { display: flex; gap: 1rem; justify-content: space-between; padding: .75rem 0; border-top: 1px solid var(--fine); font-size: .94rem; overflow-wrap: anywhere; }
.doc-list a { text-decoration: none; }
.doc-meta { color: var(--muted); text-align: right; font-size: .87rem; }
.doc-reason { display: block; margin-top: .15rem; color: var(--muted); font-size: .85rem; }
.sources { display: grid; gap: .9rem; }
.source-card { display: grid; grid-template-columns: auto 1fr auto; align-items: start; column-gap: .9rem; row-gap: .4rem; padding: 1.2rem 1.3rem; }
.source-card > .stage-icon { grid-row: 1 / 4; }
.source-card h2 { align-self: center; }
.source-card .source-state { align-self: center; display: inline-flex; align-items: center; justify-self: end; gap: .45rem; color: var(--muted); font-size: .87rem; }
.source-card p, .source-card .source-meta, .source-card .link-button { grid-column: 2 / -1; }
.source-card .link-button { justify-self: start; }
.source-meta { color: var(--muted); font-size: .84rem; line-height: 1.5; }
footer { display: flex; align-items: center; gap: .65rem; margin: 1.2rem 0 .15rem; font-size: .8rem; color: #637086; }
footer span:first-child { font-weight: 720; letter-spacing: .04em; }
footer span:last-child { margin-left: auto; }
dialog { width: min(490px,calc(100% - 2rem)); border: 1px solid var(--fine); border-radius: 18px; padding: 1.35rem; color: var(--ink); box-shadow: 0 18px 76px #1620392b; }
dialog::backdrop { background: #18233755; }
.detail-kicker { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .94rem; }
#detail-title { font-size: 1.85rem; margin: 1.1rem 0 .2rem; overflow-wrap: anywhere; }
.detail-customer { color: var(--muted); margin: 0 0 1rem; }
dl { border-top: 1px solid var(--fine); display: grid; grid-template-columns: auto 1fr; gap: .7rem; margin: 1rem 0 0; padding-top: 1rem; font-size: .95rem; }
dt { color: var(--muted); } dd { margin: 0; justify-self: end; text-align: right; overflow-wrap: anywhere; }
.wall .mode-switch, .wall footer, .wall .main-nav, .wall .search-wrap { display: none; }
.wall .mast-inner { height: 53px; }
.wall .brand-logo { width: 7.25rem; }
.wall main { padding-top: 1.1rem; }
.wall .stage-card { min-height: 105px; }
.wall .context { margin: .45rem 0 .7rem; justify-content: flex-end; }
.wall .stage-grid { margin-bottom: .7rem; }
.wall .panel-head { min-height: 46px; padding: .5rem 1.3rem; }
.wall h1 { font-size: clamp(2rem,3.4vw,4rem); }
.wall td { font-size: clamp(1rem,1.2vw,1.45rem); padding-block: .65rem; }
.wall .status, .wall .ref-button, .wall .time-cell { font-size: .98em; }
.wall .card-top { font-size: clamp(.98rem,1.25vw,1.35rem); }
@media(min-width:1550px) { html { font-size: 18px; } }
@media(max-width:1020px) {
  .stage-grid { gap: .68rem; } .stage-card { padding: .9rem; } .card-top { gap: .45rem; font-size: .94rem; }
  th,td { padding-left: .95rem; padding-right: .8rem; }
}
@media(max-width:760px) {
  .mast-inner, main { width: calc(100% - 2rem); }
  .mast-inner { flex-wrap: wrap; gap: 0; height: auto; padding-top: .7rem; }
  .brand-logo { width: 7.5rem; }
  .main-nav { order: 3; width: 100%; height: 43px; gap: 1.6rem; margin-top: .3rem; }
  .main-nav a { font-size: .88rem; }
  .main-nav .ico { width: 1rem; height: 1rem; }
  .wall-button { font-size: .85rem; padding: .48rem .68rem; }
  .context { align-items: flex-start; gap: .6rem; margin: 1rem 0; }
  .stage-grid, .stage-grid.ship { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
  .stage-card { min-height: 120px; }
  .stage-source { font-size: .8rem; }
  .clock { gap: .35rem; } .clock .ico { display: none; }
  .panel-head { padding: .85rem; gap: .65rem; flex-wrap: wrap; }
  .panel-foot { padding: .65rem .85rem; }
  .orders-table { display: block; }
  .orders-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .orders-table tbody { display: block; }
  .orders-table tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.95fr); gap: .22rem .5rem; padding: .77rem .85rem; border-top: 1px solid #e8ecf2; }
  .orders-table td { display: block; border: 0; padding: 0; }
  .orders-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .orders-table td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: .94rem; }
  .orders-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  .orders-table td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; font-size: .81rem; }
  .status { font-size: .81rem; }
  .doc-summary { padding: .85rem; } .doc-copy { margin-left: .85rem; }
  .doc-list { padding: 0 .85rem; }
  .wall .mast-inner { padding-top: 0; }
}
@media(max-width:470px) {
  .mast-inner, main { width: calc(100% - 1.45rem); }
  .clock { display: none; } h1 { font-size: 2.25rem; }
  .today { font-size: .87rem; }
  .context { display: grid; gap: .7rem; }
  .mode-switch { justify-self: start; }
  .sync-line { flex-wrap: wrap; font-size: .81rem; }
  .stage-icon { width: 1.86rem; height: 1.86rem; border-radius: .55rem; }
  .card-top { align-items: flex-start; font-size: .87rem; }
  .stage-card { padding: .76rem; min-height: 110px; }
  .card-bottom { gap: .2rem; }
  .stage-source { font-size: .75rem; }
  .search-wrap { width: 100%; } .search-wrap input { width: 100%; }
  .source-card { grid-template-columns: auto 1fr; padding: .9rem; }
  .source-card .source-state { justify-self: start; grid-column: 2; }
  .source-card .source-meta, .source-card p, .source-card .link-button { grid-column: 1 / -1; }
  .doc-list li { flex-direction: column; gap: .2rem; } .doc-meta { text-align: left; }
  .wall .context { display: flex; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; } }
