:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    color: #192844;
    background: #f4f6fb;
    --line: #e2e8f2;
    --muted: #566681;
    --blue: #284fc9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #5276fa; outline-offset: 3px; }
.sidebar { background: #14223e; color: #fff; display: flex; flex-direction: column; padding: 30px 16px 20px; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 5px; color: #fff; text-decoration: none; font-size: 19px; font-weight: 750; letter-spacing: -.025em; }
.brand small { display: block; font-size: 9px; color: #aab9d9; letter-spacing: .15em; margin-top: 4px; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #4063e3; font-size: 22px; }
.nav-label { margin: 48px 12px 12px; color: #a1b0d1; font-size: 10px; font-weight: 750; letter-spacing: .16em; }
nav { display: grid; gap: 5px; }
nav a { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 8px; color: #cad6ee; text-decoration: none; font-size: 14px; }
nav a:hover, nav a[aria-current] { background: #273e70; color: #fff; }
nav a[aria-current] { box-shadow: inset 3px 0 #829aff; font-weight: 700; }
nav a span { width: 20px; text-align: center; font-size: 18px; line-height: 1; }
.sidebar-footer { margin-top: auto; padding: 36px 10px 4px; color: #b9c9e8; font-size: 12px; }
.sidebar-footer span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #68ddbc; }
.topbar { min-height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; color: var(--muted); font-size: 13px; }
.topbar b { color: #adb8cb; margin: 0 8px; }
.topbar strong { color: #192844; }
.demo, .eyebrow { font-size: 10px; letter-spacing: .13em; font-weight: 800; }
.demo { border: 1px solid var(--line); border-radius: 20px; padding: 6px 10px; }
main { padding: 31px 34px 0; max-width: 1510px; margin: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.eyebrow { color: var(--blue); margin: 0 0 9px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(29px, 4vw, 38px); letter-spacing: -.055em; }
h2 { font-size: 18px; letter-spacing: -.035em; }
.subtitle { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 9px; }
button, input, select { min-height: 38px; border: 1px solid #d7e0ef; border-radius: 7px; background: #fff; color: inherit; padding: 8px 11px; }
button:hover { background: #edf2fc; }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; white-space: nowrap; font-weight: 700; }
.primary:hover { background: #2042aa; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 21px; }
.metrics article, .card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 12px #1a2d5510; }
.metrics article { padding: 17px; display: grid; gap: 7px; }
.metrics span, .metrics small { color: var(--muted); font-size: 12px; }
.metrics strong { font-size: clamp(17px, 2.25vw, 29px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics .metric-accent { background: #eaf0ff; border-color: #d7e1ff; color: #2348b8; }
.card-head { min-height: 76px; padding: 15px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
input[type=search] { width: 245px; max-width: 100%; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { padding: 11px 13px; text-align: left; border-top: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
th { background: #f6f8fd; color: var(--muted); font-size: 12px; }
td { height: 51px; }
tr:last-child td:first-child { border-bottom-left-radius: 12px; }
tr:last-child td:last-child { border-bottom-right-radius: 12px; }
tbody tr:hover { background: #fafbfe; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.code { color: var(--blue); font-weight: 700; }
.badge { display: inline-block; border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 750; background: #edf1f7; color: #495873; }
.received { background: #fff1da; color: #80540b; }
.shipping { background: #e8efff; color: #2c4eaf; }
.completed { background: #e2f6ee; color: #17604d; }
.cancelled { background: #f9ebee; color: #8c3d50; }
.row-action { font-size: 12px; min-height: 28px; padding: 4px 7px; margin-right: 4px; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bars { list-style: none; margin: 0; padding: 0 19px 24px; }
.bars li { margin-top: 14px; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.track { height: 8px; background: #e9edf6; border-radius: 5px; margin-top: 7px; overflow: hidden; }
.fill { display: block; height: 100%; background: #4c6be0; border-radius: inherit; }
footer { margin: 22px 0; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; }
footer span { margin-left: 8px; font-weight: 500; letter-spacing: 0; }
.notice, .error { padding: 10px 12px; background: #e2f6ee; color: #17604d; border-radius: 7px; margin-bottom: 16px; font-size: 13px; }
.error { background: #f9ebee; color: #8c3d50; }
dialog { width: min(460px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 14px; color: inherit; box-shadow: 0 18px 65px #19284440; }
dialog::backdrop { background: #14223e99; }
dialog header, .estimate, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
dialog label { display: block; margin: 15px 0 5px; font-size: 13px; font-weight: 700; }
dialog input, dialog select { width: 100%; }
.close { font-size: 22px; padding: 2px 10px; }
.estimate { margin: 16px 0; padding: 12px; background: #f1f5ff; border-radius: 7px; }
.dialog-actions { justify-content: flex-end; }
@media (max-width: 1000px) {
    body { grid-template-columns: 176px minmax(0, 1fr); }
    .topbar, main { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 720px) {
    body { display: block; }
    .sidebar { padding: 14px 16px; }
    .nav-label, .sidebar-footer { display: none; }
    nav { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
    nav a { gap: 3px; padding: 9px 5px; justify-content: center; font-size: 12px; white-space: nowrap; }
    nav a span { display: none; }
    .topbar { min-height: 46px; }
    main { padding-top: 22px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: 1fr; }
}
