:root{--ink:#172126;--muted:#68757b;--line:#dce4e4;--paper:#f3f6f5;--card:#fff;--brand:#0b6b5e;--brand2:#c9f06b;--danger:#ad3d3d;--shadow:0 18px 48px rgba(29,49,48,.07)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}.shell{min-height:100vh;display:grid;grid-template-columns:250px 1fr}aside{position:sticky;top:0;height:100vh;background:#102c2a;color:#dfeae7;padding:28px 20px;display:flex;flex-direction:column}.brand{display:grid;grid-template-columns:44px 1fr;text-decoration:none;color:white;align-items:center;margin-bottom:42px}.brand span,.login-mark{grid-row:1/3;width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--brand2);color:#17302d;font-weight:900}.brand strong{font-size:20px;line-height:1}.brand small{color:#89aaa4;margin-top:4px}nav{display:grid;gap:6px}nav a{color:#a9c0bc;text-decoration:none;padding:11px 14px;border-radius:9px}nav a:hover,nav a.active{color:#fff;background:#1a4541}.aside-foot{margin-top:auto;border-top:1px solid #2b4c48;padding:20px 10px 0}.aside-foot small{color:#72948e}.link{border:0;background:none;color:#b7d2cd;padding:8px 0;cursor:pointer}main{padding:34px 42px 70px;max-width:1500px;width:100%;margin:auto}header,.toolbar,.card-head,.actions,.inline{display:flex;align-items:center;justify-content:space-between;gap:20px}header{margin-bottom:28px}h1,h2,p{margin-top:0}h1{font-size:30px;letter-spacing:-.03em;margin-bottom:0}h2{font-size:19px;margin-bottom:4px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.14em;color:var(--brand)}.system{background:#fff;border:1px solid var(--line);border-radius:99px;padding:8px 13px;color:var(--muted);font-size:13px}.system i{display:inline-block;width:8px;height:8px;background:#65b779;border-radius:50%;margin-right:7px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stats article,.card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.stats article{padding:20px}.stats span,.stats small,.card small,td small{display:block;color:var(--muted)}.stats strong{font-size:34px;letter-spacing:-.05em}.stats strong.word{font-size:24px}.stats article.warn{border-color:#e5bcbc}.grid{display:grid;gap:20px}.grid.two{grid-template-columns:1fr 1fr}.card{padding:24px}.card-head{padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:4px}.button,.primary{display:inline-block;border:1px solid var(--line);border-radius:8px;padding:9px 14px;text-decoration:none;color:var(--ink);background:#fff;cursor:pointer;font-weight:650}.primary{background:var(--brand);border-color:var(--brand);color:#fff}.wide{width:100%}.store-row,.batch-row{display:flex;align-items:center;gap:12px;padding:16px 2px;border-bottom:1px solid #edf1f0;color:inherit;text-decoration:none}.store-row:last-child,.batch-row:last-child{border-bottom:0}.store-icon{width:38px;height:38px;border-radius:9px;background:#e4efec;color:var(--brand);display:grid;place-items:center;font-size:12px;font-weight:800}.grow{flex:1}.badge{display:inline-block;border-radius:99px;padding:5px 9px;background:#edf1f0;color:#66736f;font-size:12px;font-weight:700}.badge.good,.status-completed,.status-sent{background:#dff3e4;color:#23763d}.status-failed,.status-partial{background:#f7e1e1;color:#9a3434}.status-queued,.status-processing,.status-received,.status-validated{background:#e7edf9;color:#315e9e}.empty{text-align:center;color:var(--muted);padding:38px}.toolbar{margin-bottom:18px}.toolbar p{margin-bottom:0;color:var(--muted)}table{width:100%;border-collapse:collapse}th{text-align:left;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}th,td{padding:14px 13px;border-bottom:1px solid #edf1f0;vertical-align:top}.table-card{overflow:auto;padding:8px}.stack{display:grid;gap:20px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}label{display:grid;gap:6px;font-weight:650;color:#43504f;margin-top:14px}input,select{width:100%;border:1px solid #cfd9d7;border-radius:8px;padding:11px 12px;background:#fff;color:var(--ink);font:inherit}input:focus,select:focus{outline:3px solid rgba(11,107,94,.12);border-color:var(--brand)}input[readonly]{background:#f2f4f4;color:#6e7876}.check{display:flex;align-items:center;gap:9px}.check input{width:auto}.mapping{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.mapping label{grid-template-columns:120px 20px 1fr;align-items:center}.mapping code,.token-box code{font-weight:800;color:var(--brand)}.settings-grid{margin-top:24px}.token-box{background:#ecf7d6;border:1px solid #cde699;border-radius:12px;padding:18px;margin-bottom:20px}.token-box code{display:block;padding:12px;background:#fff;border-radius:8px;margin:10px 0;word-break:break-all}.flash{padding:13px 16px;border-radius:9px;margin:0 0 18px}.flash.success{background:#ddf1e3;color:#246b3a}.flash.error{background:#f6dede;color:#8f3030}.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 15% 15%,#dcece7,transparent 35%),#eff3f1}.login-card{width:min(440px,calc(100% - 32px));padding:40px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 30px 80px rgba(20,50,46,.13)}.login-card .login-mark{margin-bottom:24px}.login-card h1{margin:8px 0}.login-card p{color:var(--muted)}.login-card>small{display:block;text-align:center;color:var(--muted);margin-top:22px}@media(max-width:900px){.shell{grid-template-columns:1fr}aside{position:static;height:auto}.aside-foot{display:none}nav{grid-template-columns:repeat(3,1fr)}main{padding:24px}.stats,.grid.two,.form-grid,.mapping{grid-template-columns:1fr}}@media(max-width:560px){.stats{grid-template-columns:1fr 1fr}header{align-items:flex-start}.system{display:none}nav{grid-template-columns:1fr}.mapping label{grid-template-columns:95px 12px 1fr}}

@keyframes sync-spin{to{transform:rotate(360deg)}}@keyframes sync-pulse{0%,100%{box-shadow:0 0 0 0 rgba(201,240,107,.44);transform:scale(1)}50%{box-shadow:0 0 0 8px rgba(201,240,107,0);transform:scale(1.04)}}@keyframes sync-flow{0%{background-position:0 50%}100%{background-position:180px 50%}}@keyframes sync-breathe{0%,100%{opacity:.72;transform:translateY(0)}50%{opacity:1;transform:translateY(-1px)}}@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}
.brand span{position:relative;overflow:hidden}.brand span::after{content:"";position:absolute;inset:-45%;background:linear-gradient(120deg,transparent 35%,rgba(255,255,255,.38),transparent 65%);transform:translateX(-70%) rotate(10deg);animation:sync-flow 4.8s ease-in-out infinite}
nav a{display:flex;align-items:center;gap:10px;position:relative;overflow:hidden}nav a::after{content:"";position:absolute;left:14px;right:14px;bottom:6px;height:2px;border-radius:99px;background:linear-gradient(90deg,transparent,var(--brand2),transparent);opacity:0;transform:translateX(-30%);transition:opacity .18s ease,transform .18s ease}nav a:hover::after,nav a.active::after{opacity:.5;transform:translateX(0)}
.nav-icon{width:20px;height:20px;border-radius:8px;display:inline-grid;place-items:center;position:relative;flex:0 0 auto;color:currentColor}.nav-icon::before,.nav-icon::after{content:"";position:absolute}.nav-icon.overview::before{width:14px;height:10px;border:2px solid currentColor;border-top:0;border-radius:0 0 8px 8px;bottom:3px;opacity:.85}.nav-icon.overview::after{width:10px;height:10px;border-left:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg);top:3px}.nav-icon.stores::before{width:15px;height:12px;border:2px solid currentColor;border-radius:4px;bottom:3px}.nav-icon.stores::after{width:7px;height:7px;border-radius:50%;background:currentColor;top:2px;right:1px;box-shadow:-10px 9px 0 -2px currentColor}.nav-icon.sync::before{width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:sync-spin 2s linear infinite}.nav-icon.sync::after{width:4px;height:4px;border-radius:50%;background:currentColor;right:1px;top:3px}.nav-icon.review::before{width:14px;height:16px;border:2px solid currentColor;border-radius:4px}.nav-icon.review::after{width:8px;height:2px;background:currentColor;box-shadow:0 5px 0 currentColor;top:6px}.nav-icon.users::before{width:8px;height:8px;border-radius:50%;background:currentColor;top:2px}.nav-icon.users::after{width:16px;height:8px;border-radius:9px 9px 3px 3px;border:2px solid currentColor;border-bottom:0;bottom:3px}.nav-icon.audit::before{width:14px;height:14px;border:2px solid currentColor;border-radius:50%}.nav-icon.audit::after{width:7px;height:2px;background:currentColor;transform:rotate(35deg);right:1px;bottom:3px}.nav-icon.security::before{width:14px;height:15px;border:2px solid currentColor;border-radius:7px 7px 5px 5px;bottom:2px}.nav-icon.security::after{width:8px;height:6px;border:2px solid currentColor;border-bottom:0;border-radius:8px 8px 0 0;top:1px}
.system{display:inline-flex;align-items:center;gap:7px}.system i{margin-right:0}.system.good i{animation:sync-pulse 2.8s ease-in-out infinite}.system.warning i{animation:sync-breathe 1.7s ease-in-out infinite}
.hero-card{position:relative;overflow:hidden;margin-bottom:20px;background:linear-gradient(135deg,#fff,#f7fbf9 55%,#eef7f0);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:24px;display:flex;align-items:center;justify-content:space-between;gap:22px}.hero-card::after{content:"";position:absolute;right:-90px;top:-120px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,rgba(201,240,107,.34),transparent 64%)}.hero-card h2{font-size:24px;letter-spacing:-.03em}.hero-card p{color:var(--muted);margin-bottom:0;max-width:720px}.sync-orb{width:68px;height:68px;border-radius:22px;background:conic-gradient(from 0deg,var(--brand),var(--brand2),#89d0c3,var(--brand));display:grid;place-items:center;box-shadow:0 18px 38px rgba(11,107,94,.18);animation:sync-spin 4s linear infinite;flex:0 0 auto;position:relative}.sync-orb::before{content:"";width:42px;height:42px;border-radius:15px;background:#fff}.sync-orb::after{content:"";position:absolute;width:20px;height:20px;border:3px solid var(--brand);border-right-color:transparent;border-radius:50%}
.status-line{display:inline-flex;align-items:center;gap:8px}.sync-dot{width:16px;height:16px;border-radius:50%;display:inline-grid;place-items:center;position:relative;background:#edf1f0;color:#66736f;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}.sync-dot::before{content:"";position:absolute}.sync-dot.completed,.sync-dot.sent{background:#dff3e4;color:#23763d}.sync-dot.completed::before,.sync-dot.sent::before{width:8px;height:4px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);top:5px}.sync-dot.failed,.sync-dot.partial{background:#f7e1e1;color:#9a3434}.sync-dot.failed::before,.sync-dot.failed::after,.sync-dot.partial::before,.sync-dot.partial::after{width:9px;height:2px;border-radius:99px;background:currentColor}.sync-dot.failed::before,.sync-dot.partial::before{transform:rotate(45deg)}.sync-dot.failed::after,.sync-dot.partial::after{content:"";position:absolute;transform:rotate(-45deg)}.sync-dot.processing,.sync-dot.received,.sync-dot.queued,.sync-dot.validated{background:#e7edf9;color:#315e9e}.sync-dot.processing::before,.sync-dot.received::before{width:10px;height:10px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:sync-spin 1.1s linear infinite}.sync-dot.queued::before,.sync-dot.validated::before{width:7px;height:7px;border-radius:50%;background:currentColor;animation:sync-pulse 1.8s ease-in-out infinite}
.sync-progress{height:7px;border-radius:99px;background:#edf1f0;overflow:hidden;margin-top:8px}.sync-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),var(--brand2),#88d1c3);background-size:180px 100%;animation:sync-flow 2.6s linear infinite}.mini-note{display:block;color:var(--muted);font-size:12px;margin-top:4px}.status-rail{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}.status-rail article{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:var(--shadow)}.status-rail span{display:block;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.status-rail strong{font-size:24px;letter-spacing:-.04em}
@media(max-width:760px){.hero-card{align-items:flex-start}.hero-card .sync-orb{width:54px;height:54px;border-radius:18px}.status-rail{grid-template-columns:1fr}}

/* Motion communicates live work only. Completed, failed, and idle states stay still. */
.brand span::after{animation:none;opacity:0;transition:opacity .2s ease,transform .45s ease}
.brand:hover span::after,.brand:focus-visible span::after{opacity:1;transform:translateX(45%) rotate(10deg)}
.nav-icon.sync::before,.system.good i,.system.warning i{animation:none}

.hero-card.is-active{border-color:#b9d9d2;background:linear-gradient(135deg,#fff,#f3faf7 55%,#e8f5ed)}
.hero-card.is-complete{border-color:#cce4d2}
.hero-card.needs-attention{border-color:#e9c784;background:linear-gradient(135deg,#fff,#fffaf0 58%,#fff4d8)}
.hero-card.is-idle{background:linear-gradient(135deg,#fff,#f7faf9 58%,#eef3f1)}

.sync-orb{animation:none;background:#dfe8e5;box-shadow:0 14px 28px rgba(29,49,48,.1)}
.sync-orb.is-active{background:conic-gradient(from 0deg,var(--brand),var(--brand2),#89d0c3,var(--brand));animation:sync-spin 4s linear infinite;box-shadow:0 18px 38px rgba(11,107,94,.18)}
.sync-orb.is-idle::after{border-color:#6f807b;border-right-color:transparent}
.sync-orb.is-complete{background:#65b779}
.sync-orb.is-complete::after{width:22px;height:11px;border:0;border-left:4px solid var(--brand);border-bottom:4px solid var(--brand);border-radius:0;transform:rotate(-45deg);top:24px}
.sync-orb.needs-attention{background:#e5ae3f}
.sync-orb.needs-attention::after{content:"!";width:auto;height:auto;border:0;color:#7a4d00;font-size:28px;font-weight:900;line-height:1}

.sync-progress span{animation:none;background:var(--brand)}
.sync-progress.is-active span{background:linear-gradient(90deg,var(--brand),var(--brand2),#88d1c3);background-size:180px 100%;animation:sync-flow 2.6s linear infinite}
.sync-progress.is-complete span{background:#65b779}
.sync-progress.needs-attention span{background:#d69b23}
progress.sync-progress{display:block;width:100%;height:7px;border:0;appearance:none;-webkit-appearance:none}
progress.sync-progress::-webkit-progress-bar{background:#edf1f0;border-radius:99px}
progress.sync-progress::-webkit-progress-value{background:var(--brand);border-radius:99px;transition:width .2s ease}
progress.sync-progress::-moz-progress-bar{background:var(--brand);border-radius:99px;transition:width .2s ease}
progress.sync-progress.is-active::-webkit-progress-value{background:linear-gradient(90deg,var(--brand),var(--brand2),#88d1c3)}
progress.sync-progress.is-active::-moz-progress-bar{background:linear-gradient(90deg,var(--brand),var(--brand2),#88d1c3)}
progress.sync-progress.is-complete::-webkit-progress-value{background:#65b779}
progress.sync-progress.is-complete::-moz-progress-bar{background:#65b779}
progress.sync-progress.needs-attention::-webkit-progress-value{background:#d69b23}
progress.sync-progress.needs-attention::-moz-progress-bar{background:#d69b23}

.badge.status-partial,.badge.status-completed-with-issues{background:#fff0c7;color:#805400}
.sync-dot.partial,.sync-dot.completed-with-issues{background:#fff0c7;color:#805400}
.sync-dot.partial::before,.sync-dot.completed-with-issues::before{width:2px;height:7px;border:0;border-radius:2px;background:currentColor;transform:none;top:3px}
.sync-dot.partial::after,.sync-dot.completed-with-issues::after{content:"";position:absolute;width:2px;height:2px;border:0;border-radius:50%;background:currentColor;transform:none;bottom:3px}

.status-rail article.needs-attention{border-color:#e9c784;background:#fffaf0}
.stats article.attention{border-color:#e9c784;background:#fffaf0}
.toolbar{flex-wrap:wrap}
td small{overflow-wrap:anywhere}
time{white-space:nowrap}
.shell>main,.hero-card>div{min-width:0}
.table-card{max-width:100%}
.batch-items table{min-width:820px}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px;padding:12px 4px;color:var(--muted)}
.pagination a{color:var(--brand);font-weight:700;text-decoration:none;padding:8px 10px;border-radius:8px}
.pagination a::after{display:none}
.pagination a:hover{background:#e4efec}
.pagination .disabled{opacity:.55}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(11,107,94,.28);outline-offset:3px}

@media(max-width:760px){
    .hero-card{display:grid;grid-template-columns:1fr auto}
    .hero-card h2{font-size:21px}
    .status-line{align-items:flex-start}
    .pagination{font-size:13px}
}

@media(max-width:520px){
    aside{padding:20px 16px}
    .brand{margin-bottom:20px}
    .sidebar-nav{grid-template-columns:1fr 1fr}
    .sidebar-nav a{padding:10px;font-size:13px}
    .hero-card{grid-template-columns:1fr}
    .hero-card .sync-orb{display:none}
    .stats{grid-template-columns:1fr}
    main{padding:20px 16px 56px}
}
