:root {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  --sidebar-width: 216px;
  --topbar-height: 60px;
  --purple: #552092;
  --purple-deep: #4d1d88;
  --line: #e8ebf5;
  --text: #182235;
  --muted: #8993a5;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 760px; min-height: 100%; margin: 0; }
body { min-height: 100vh; overflow: hidden; background: #f4f6fb; color: var(--text); }
button, input, select, a { font: inherit; }
button { border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.agent-shell { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
.agent-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; isolation: isolate; display: flex; width: var(--sidebar-width); flex-direction: column; overflow: hidden; border-right: 1px solid rgba(255,255,255,.08); background: radial-gradient(circle at 16% 4%,rgba(134,111,225,.22),transparent 24%), radial-gradient(circle at 86% 68%,rgba(74,122,191,.13),transparent 28%), linear-gradient(180deg,#30284f 0%,#292342 48%,#211c37 100%); box-shadow: 12px 0 32px rgba(30,24,55,.12); scrollbar-width: none; }
.agent-sidebar::before { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(110deg,rgba(255,255,255,.045),transparent 28%,transparent 72%,rgba(255,255,255,.025)); content: ""; }
.agent-sidebar::-webkit-scrollbar { display: none; }
.agent-brand { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 11px; height: 70px; margin: 10px 11px 8px; padding: 0 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: linear-gradient(135deg,rgba(255,255,255,.13),rgba(255,255,255,.045)); color: #fff; text-decoration: none; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 28px rgba(13,9,30,.16); }
.agent-brand::after { position: absolute; top: -34px; right: -22px; width: 88px; height: 88px; border: 1px solid rgba(239,211,132,.12); border-radius: 50%; content: ""; }
.agent-brand-mark { position: relative; z-index: 1; display: grid; flex:0 0 43px; width: 43px; height: 43px; place-items: center; border: 2px solid rgba(255,255,255,.92); border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(237,207,119,.1), 0 7px 16px rgba(17,10,38,.28); }
.agent-brand-mark img, .agent-logout-brand img, .agent-session-transition > div > span img { display:block; width:100%; height:100%; object-fit:contain; border-radius:50%; }
.agent-brand-copy { position: relative; z-index: 1; display: grid; gap: 2px; min-width: 0; }
.agent-brand strong { font-size: 20px; font-weight: 800; letter-spacing: -.55px; line-height: 1.12; }
.agent-brand small { color: rgba(239,229,255,.65); font-size: 7px; font-weight: 700; letter-spacing: .12em; line-height: 1; }
.agent-menu { flex: 1 1 auto; min-height: 0; padding: 2px 11px 16px; overflow: hidden auto; scrollbar-width: none; }
.agent-menu::-webkit-scrollbar { display: none; }
.agent-menu > a,
.agent-menu-parent { display: grid; width: 100%; grid-template-columns: 39px minmax(0,1fr) 20px; align-items: center; height: 50px; padding: 0 7px; border: 1px solid transparent; border-radius: 12px; color: #fff; text-decoration: none; background: transparent; text-align: left; cursor: pointer; transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease; }
.agent-menu > a:hover,
.agent-menu > a:focus-visible,
.agent-menu-parent:hover,
.agent-menu-parent:focus-visible { outline: none; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.agent-menu > a.is-active { border-color: rgba(230,211,255,.18); background: linear-gradient(90deg,rgba(121,99,197,.42),rgba(255,255,255,.075)); box-shadow: inset 3px 0 0 #e7ca78, 0 7px 16px rgba(14,9,34,.12); }
.agent-menu > a > span:nth-child(2),
.agent-menu-parent > span:nth-child(2) { font-size: 14px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.agent-menu-group { margin-bottom: 3px; overflow: hidden; border: 1px solid transparent; border-radius: 13px; transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease; }
.agent-menu-group.is-open { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.035); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
.agent-menu-group.is-open .agent-menu-parent { background: rgba(255,255,255,.065); }
.agent-menu-group.is-open .agent-menu-parent.is-active { background: rgba(255,255,255,.08); }
.agent-menu-chevron,
.agent-menu-link-arrow { display: grid; width: 20px; height: 20px; place-items: center; color: rgba(239,234,255,.72); transition: transform .4s cubic-bezier(.2,.75,.25,1), color .2s ease; }
.agent-menu-chevron svg,
.agent-menu-link-arrow svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.agent-menu-group.is-open .agent-menu-chevron { color: #f5df9c; transform: rotate(180deg); }
.agent-menu > a:hover .agent-menu-link-arrow { color: #f5df9c; transform: translateX(2px); }
.agent-submenu { display: grid; grid-template-rows: 0fr; opacity: 0; translate: 0 -6px; visibility: hidden; pointer-events: none; transition: grid-template-rows .42s cubic-bezier(.2,.75,.25,1), opacity .24s ease, translate .42s cubic-bezier(.2,.75,.25,1), visibility 0s linear .42s; }
.agent-menu-group.is-open .agent-submenu { grid-template-rows: 1fr; opacity: 1; translate: 0 0; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.agent-submenu-inner { min-height: 0; overflow: hidden; padding: 0 7px 0 45px; transition: padding .42s cubic-bezier(.2,.75,.25,1); }
.agent-menu-group.is-open .agent-submenu-inner { padding-top: 4px; padding-bottom: 9px; }
.agent-submenu button,
.agent-submenu a { position: relative; display: block; width: 100%; height: 34px; padding: 0 9px 0 15px; border-radius: 9px; color: rgba(239,234,255,.76); background: transparent; text-align: left; text-decoration: none; font-size: 13px; line-height: 34px; cursor: pointer; transition: color .2s ease, background-color .2s ease, padding-left .24s ease; }
.agent-submenu button::before,
.agent-submenu a::before { position: absolute; top: 50%; left: 5px; width: 4px; height: 4px; border-radius: 50%; background: rgba(231,220,255,.42); content: ""; translate: 0 -50%; transition: background-color .2s ease, box-shadow .2s ease, scale .2s ease; }
.agent-submenu button:hover,
.agent-submenu a:hover { padding-left: 18px; background: rgba(255,255,255,.06); color: #fff; }
.agent-submenu a span { margin-left: 4px; font-size: 11px; opacity: .72; }
.agent-submenu button.is-active { background: linear-gradient(90deg,rgba(117,91,204,.42),rgba(255,255,255,.075)); color: #fff; font-weight: 700; box-shadow: inset 2px 0 #e7ca78; }
.agent-submenu button.is-active::before { background: #f2d887; box-shadow: 0 0 0 3px rgba(242,216,135,.11); scale: 1.15; }
.agent-menu-icon { --menu-icon-color:#dcd4ff; display: inline-grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.045)); color: var(--menu-icon-color); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 10px rgba(11,8,28,.12); line-height: 1; transition: background-color .22s ease, border-color .22s ease, transform .22s cubic-bezier(.2,.75,.25,1), box-shadow .22s ease; }
.agent-menu-parent:hover .agent-menu-icon,
.agent-menu > a:hover .agent-menu-icon,
.agent-menu-group.is-open .agent-menu-icon { border-color: color-mix(in srgb,var(--menu-icon-color) 28%,transparent); background: linear-gradient(145deg,rgba(255,255,255,.17),color-mix(in srgb,var(--menu-icon-color) 10%,transparent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 13px rgba(11,8,28,.17); transform: translateY(-1px); }
.agent-menu-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(7,5,22,.2)); }
.agent-menu-icon.home,
.agent-menu-icon.clipboard { --menu-icon-color:#f0d48b; }
.agent-menu-icon.parcel,
.agent-menu-icon.shelf { --menu-icon-color:#a9d5f6; }
.agent-menu-icon.sparkle,
.agent-menu-icon.ai { --menu-icon-color:#cfbaff; }
.agent-menu-icon.ticket,
.agent-menu-icon.earning { --menu-icon-color:#92e2d4; }
.agent-menu-icon.auth { --menu-icon-color:#d7c9ff; }
.agent-menu-icon.tools,
.agent-menu-icon.system { --menu-icon-color:#c6d0eb; }
.agent-menu-icon.calculator,
.agent-menu-icon.wallet { --menu-icon-color:#ebca7d; }

.agent-sidebar-token-card { display: grid; flex: 0 0 auto; gap: 7px; width: auto; min-height: 70px; margin: 0 11px 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.055)); color: rgba(235,231,248,.72); text-align: left; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(12,8,28,.16); transition: border-color .2s ease, background-color .2s ease, translate .2s ease; }
.agent-sidebar-token-card[hidden] { display: none; }
.agent-sidebar-token-card:hover,
.agent-sidebar-token-card:focus-visible { outline: none; border-color: rgba(240,209,121,.38); background: linear-gradient(135deg,rgba(255,255,255,.16),rgba(238,207,119,.08)); }
.agent-sidebar-token-card:active { translate: 0 1px; }
.agent-sidebar-token-card > span { font-size: 12px; line-height: 1; }
.agent-sidebar-token-card strong { display: flex; align-items: baseline; gap: 4px; overflow: hidden; color: #fff; font-size: 14px; line-height: 1.1; white-space: nowrap; }
.agent-sidebar-token-card strong b { overflow: hidden; color: #f0d078; font-size: 22px; font-weight: 800; letter-spacing: -.4px; text-overflow: ellipsis; }
.agent-sidebar-token-card strong small { color: #e9c96f; font-size: 10px; font-weight: 750; }

.agent-topbar { position: fixed; inset: 0 0 auto var(--sidebar-width); z-index: 15; display: flex; align-items: center; gap: 6px; height: var(--topbar-height); padding: 8px 12px; background: #f3f1ed; border-bottom: 1px solid #e8e5df; }
.agent-tabs { display: flex; flex: 1 1 0; align-items: center; gap: 4px; min-width: 0; height: 42px; padding: 4px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; border-radius: 14px; background: #fff; scrollbar-width: none; }
.agent-tabs::-webkit-scrollbar { display: none; }
.agent-tab { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; height: 32px; min-width: 76px; padding: 0 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #717580; white-space: nowrap; line-height: 20px; cursor: pointer; }
.agent-tab:hover { background: #f6f5f2; }
.agent-tab.is-active { border-color: #ebd49e; background: #fff8e7; color: #815d13; box-shadow: 0 2px 5px #aa823319; }
.agent-tab:focus-visible { outline: 2px solid #b78d35; outline-offset: -2px; }
.agent-tab span { font-size: 13px; }
.agent-tab > span:first-child { white-space: nowrap; }
.agent-tabs-scroll { flex: 0 0 24px; width: 24px; height: 32px; padding: 0; border-radius: 8px; background: #fff; color: #8f7b51; font-size: 20px; cursor: pointer; }
.agent-tabs-scroll:hover { background: #fff4d7; }
.agent-tab[hidden] { display: none; }
.agent-tab-close { display: inline-grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #a6a4a0; font-size: 14px !important; line-height: 1; }
.agent-tab-close:hover,
.agent-tab-close:focus-visible { background: rgba(48,61,91,.1); color: #ef445c; outline: none; }
.agent-top-actions { display: flex; flex: 0 0 auto; align-items: center; padding-left: 6px; white-space: nowrap; }
.agent-top-actions button,
.agent-top-actions a { height: 36px; color: #454b56; background: transparent; cursor: pointer; }
.agent-plugin-wrap { position: relative; display: flex; align-items: center; height: 100%; }
.download-action { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #e4e0d7; border-radius: 9px; background: #fff !important; font-size: 13px; text-decoration: none; white-space: nowrap; }
.download-action > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.download-action[aria-expanded="true"] { border-color: #d7b765; color: #805e16; background: #fff9e9 !important; }
.agent-plugin-popover { position: fixed; top: calc(var(--topbar-height) + 8px); right: 128px; z-index: 100; width: min(410px,calc(100vw - var(--sidebar-width) - 24px)); max-height: calc(100vh - var(--topbar-height) - 18px); padding: 16px; overflow: auto; border: 1px solid #e7e0d2; border-radius: 18px; background: #fffdfa; color: #202734; box-shadow: 0 22px 60px rgba(36,27,18,.22); white-space: normal; }
.agent-plugin-popover[hidden] { display: none; }
.agent-plugin-popover::before { position: absolute; top: -6px; right: 86px; width: 11px; height: 11px; border: 1px solid #e7e0d2; border-right: 0; border-bottom: 0; background: #fffdfa; content: ""; transform: rotate(45deg); }
.agent-plugin-close { position: absolute; top: 11px; right: 11px; z-index: 1; width: 30px; height: 30px !important; padding: 0; border-radius: 50%; color: #8b8790 !important; background: #f4f1eb !important; font-size: 20px; line-height: 1; }
.agent-plugin-heading { display: flex; align-items: center; gap: 12px; padding: 2px 38px 14px 0; }
.agent-plugin-heading > span { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 14px; color: #9a6f17; background: #fff2c9; }
.agent-plugin-heading svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agent-plugin-heading div { display: grid; gap: 2px; }
.agent-plugin-heading small { color: #aa7b1d; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.agent-plugin-heading h2 { margin: 0; font-size: 19px; }
.agent-plugin-heading p { margin: 0; color: #7b7f88; font-size: 11px; }
.agent-plugin-progress { display: grid; gap: 6px; margin-bottom: 12px; color: #7c7362; font-size: 10px; }
.agent-plugin-progress > i { height: 4px; overflow: hidden; border-radius: 999px; background: #eeeae2; }
.agent-plugin-progress > i > b { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#d6a636,#6ab796); transition: width .2s ease; }
.agent-plugin-stage { display: grid; justify-items: center; padding: 18px; border: 1px solid #eee5d5; border-radius: 16px; background: linear-gradient(145deg,#fff,#fff9eb); text-align: center; }
.agent-plugin-stage[hidden] { display: none; }
.agent-plugin-stage-icon { display: grid; width: 45px; height: 45px; place-items: center; margin-bottom: 8px; border-radius: 14px; color: #fff; background: linear-gradient(135deg,#c89a2a,#e4bb53); font-size: 21px; font-weight: 800; }
.agent-plugin-stage.success .agent-plugin-stage-icon { background: linear-gradient(135deg,#35a477,#6bc59e); }
.agent-plugin-stage > small { color: #a57719; font-size: 9px; font-weight: 900; }
.agent-plugin-stage h3 { margin: 4px 0 5px; font-size: 17px; }
.agent-plugin-stage p { margin: 0 0 11px; color: #747984; font-size: 11px; line-height: 1.65; }
.agent-plugin-release { width: 100%; padding: 8px 10px; border-radius: 9px; background: #f7f4ed; text-align: left; }
.agent-plugin-primary { display: inline-flex !important; min-width: 150px; height: 38px !important; align-items: center; justify-content: center; padding: 0 16px; border: 0; border-radius: 10px; color: #fff !important; background: #23272e !important; text-decoration: none; font-size: 12px; font-weight: 800; cursor: pointer; }
.agent-plugin-primary[aria-disabled="true"] { pointer-events: none; opacity: .48; }
.agent-plugin-minor { height: 28px !important; margin-top: 5px; padding: 0 8px; color: #8b7a58 !important; background: transparent !important; font-size: 10px; }
.agent-plugin-address { display: flex; width: 100%; align-items: center; gap: 7px; margin: 3px 0 13px; padding: 6px 7px 6px 11px; border: 1px solid #e3ded4; border-radius: 10px; background: #fff; }
.agent-plugin-address code { min-width: 0; flex: 1; overflow: hidden; color: #4d5562; font-size: 11px; text-align: left; text-overflow: ellipsis; }
.agent-plugin-address button { flex: 0 0 auto; height: 28px !important; padding: 0 9px; border-radius: 7px; color: #7e5c18 !important; background: #fff2cb !important; font-size: 10px; }
.agent-plugin-collector { margin-top: 10px; border: 1px solid #e8e5de; border-radius: 12px; background: #fff; }
.agent-plugin-collector summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; color: #525866; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.agent-plugin-collector summary::-webkit-details-marker { display: none; }
.agent-plugin-collector summary span { color: #a1741c; font-size: 9px; }
.agent-plugin-collector > div { display: grid; gap: 5px; padding: 0 13px 13px; }
.agent-plugin-collector strong { font-size: 12px; }
.agent-plugin-collector small { color: #878c96; font-size: 10px; }
.agent-plugin-collector a { display: inline-flex; width: fit-content; height: 30px !important; align-items: center; padding: 0 10px; border-radius: 8px; color: #7d5b17 !important; background: #fff2c8 !important; text-decoration: none; font-size: 10px; font-weight: 800; }
.action-divider { flex: 0 0 1px; width: 1px; height: 18px; margin: 0 9px; background: #ddd9d0; }
.notification-action { width: 25px; padding: 0; font-size: 17px; }
.profile-action { display: flex; align-items: center; gap: 7px; padding: 0; }
.profile-action strong { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.profile-action i { font-size: 9px; font-style: normal; }
.profile-avatar { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #bac2d0; color: #fff; font-size: 9px; }
.agent-profile-wrap { position: relative; display: flex; align-items: center; height: 100%; }
.profile-action[aria-expanded="true"] { color: #986d16; }
.profile-action[aria-expanded="true"] i { transform: rotate(180deg); }
.profile-avatar.has-image { background-position: center; background-size: cover; color: transparent; }
.agent-profile-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: 300px; padding: 10px; border: 1px solid #e6e8f1; border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(27,20,52,.22); color: #172235; }
.agent-profile-menu[hidden] { display: none; }
.agent-profile-menu::before { position: absolute; top: -6px; right: 26px; width: 12px; height: 12px; border: 1px solid #e6e8f1; border-right: 0; border-bottom: 0; background: #fff; content: ""; transform: rotate(45deg); }
.agent-profile-summary { display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 8px 9px 12px; border-bottom: 1px solid #edf0f5; }
.agent-profile-summary .profile-avatar.large { flex: 0 0 auto; width: 40px; height: 40px; background-color: #7045b2; font-size: 13px; }
.agent-profile-summary div { display: grid; min-width: 0; gap: 3px; }
.agent-profile-summary strong { overflow: hidden; color: #202a3d; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.agent-profile-summary small { overflow: hidden; color: #8b94a6; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agent-profile-actions { display: grid; gap: 3px; padding-top: 7px; }
.agent-profile-actions[hidden] { display: none; }
.agent-profile-actions button { display: grid; width: 100%; height: auto; min-height: 54px; grid-template-columns: 34px minmax(0,1fr) 16px; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; color: #2a3448; background: transparent; text-align: left; cursor: pointer; }
.agent-profile-actions button:hover,
.agent-profile-actions button:focus-visible { outline: none; background: #f5f1fb; }
.agent-profile-actions button > i { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #eee7f9; color: #6532a0; font-size: 12px; font-style: normal; font-weight: 800; }
.agent-profile-actions button > span { display: grid; gap: 2px; }
.agent-profile-actions button strong { font-size: 13px; }
.agent-profile-actions button small { color: #929bad; font-size: 11px; }
.agent-profile-actions button > b { color: #a1a9b8; font-size: 20px; font-weight: 400; }
.agent-profile-actions button.danger { margin-top: 3px; border-top: 1px solid #f0e7e9; border-radius: 0 0 9px 9px; color: #c63f51; }
.agent-profile-actions button.danger > i { background: #fff0f2; color: #cf4658; }

.agent-auth-dialog { width: min(920px,calc(100vw - 48px)); height: min(760px,calc(100vh - 48px)); padding: 0; border: 0; border-radius: 22px; background: transparent; box-shadow: 0 30px 80px rgba(18,9,48,.38); overflow: hidden; }
.agent-auth-dialog::backdrop { background: rgba(18,10,36,.58); backdrop-filter: blur(8px); }
.agent-auth-card { display: grid; grid-template-rows: auto minmax(0,1fr); width: 100%; height: 100%; background: #f5f7fb; }
.agent-auth-card > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 14px 18px 14px 24px; color: #fff; background: linear-gradient(120deg,#3f146f,#64239e); }
.agent-auth-card > header div { display: grid; gap: 3px; }
.agent-auth-card > header span { color: #d9c1ff; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.agent-auth-card > header strong { font-size: 20px; }
.agent-auth-card > header small { color: rgba(255,255,255,.72); font-size: 12px; }
.agent-auth-card > header button { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); font-size: 22px; cursor: pointer; }
.agent-auth-card iframe { display: block; width: 100%; height: 100%; border: 0; background: #101a34; }
body.agent-auth-active .agent-auth-dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; border-radius: 0; box-shadow: none; }
body.agent-auth-active .agent-auth-dialog::backdrop { background: #071226; backdrop-filter: none; }
body.agent-auth-active .agent-auth-card { grid-template-rows: minmax(0,1fr); }
body.agent-auth-active .agent-auth-card > header { display: none; }
body.agent-auth-active .agent-sidebar,
body.agent-auth-active .agent-topbar,
body.agent-auth-active .agent-workspace,
body.agent-session-transition-active .agent-sidebar,
body.agent-session-transition-active .agent-topbar,
body.agent-session-transition-active .agent-workspace { visibility: hidden; pointer-events: none; }

.agent-logout-dialog { width: min(460px,calc(100vw - 32px)); padding: 0; border: 0; border-radius: 24px; overflow: hidden; background: transparent; box-shadow: 0 30px 90px rgba(20,7,46,.42); }
.agent-logout-dialog::backdrop { background: rgba(20,10,42,.66); backdrop-filter: blur(9px); }
.agent-logout-card { display: grid; justify-items: center; padding: 34px 34px 28px; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: radial-gradient(circle at 82% 8%,rgba(118,78,197,.12),transparent 30%),linear-gradient(150deg,#fff,#faf8ff); text-align: center; }
.agent-logout-brand { display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 15px; border: 1px solid #eadff8; border-radius: 20px; background: linear-gradient(145deg,#f5efff,#fff); box-shadow: 0 12px 28px rgba(85,32,146,.15); font-size: 30px; }
.agent-logout-card > small { color: #966bc5; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.agent-logout-card h2 { margin: 7px 0 0; color: #21172d; font-size: 25px; }
.agent-logout-card > p { max-width: 350px; margin: 11px 0 18px; color: #6f6879; font-size: 13px; line-height: 1.75; }
.agent-logout-note { display: flex; width: 100%; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #dceee7; border-radius: 13px; color: #286b55; background: #f1faf6; text-align: left; }
.agent-logout-note > i { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #fff; background: #36a67d; font-size: 12px; font-style: normal; font-weight: 900; }
.agent-logout-note span { display: grid; gap: 2px; }
.agent-logout-note strong { font-size: 11px; }
.agent-logout-note small { color: #7d9a8f; font-size: 9px; }
.agent-logout-card footer { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.agent-logout-card footer button { min-height: 44px; border-radius: 12px; font-size: 12px; font-weight: 800; cursor: pointer; }
.agent-logout-cancel { border: 1px solid #dfd8e8; color: #625b6b; background: #fff; }
.agent-logout-confirm { border: 1px solid #7133ad; color: #fff; background: linear-gradient(135deg,#6f2cad,#4d1d88); box-shadow: 0 10px 24px rgba(85,32,146,.22); }
.agent-logout-card footer button:hover { transform: translateY(-1px); }
.agent-logout-card footer button:focus-visible { outline: 3px solid rgba(116,70,175,.24); outline-offset: 2px; }

.agent-session-transition { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 46%,rgba(255,255,255,.96) 0 18%,rgba(241,247,255,.95) 34%,rgba(226,239,255,.98) 66%,#e7e6f5 100%); }
.agent-session-transition[hidden] { display: none; }
.agent-session-transition::before { position: absolute; width: min(680px,76vw); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.86); border-radius: 50%; content: ""; box-shadow: 0 0 80px rgba(70,105,160,.12); }
.agent-session-transition > div { position: relative; z-index: 1; display: grid; width: min(410px,calc(100vw - 36px)); justify-items: center; padding: 38px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.88); box-shadow: 0 28px 70px rgba(47,62,89,.18); text-align: center; }
.agent-session-transition > div > span { display: grid; width: 62px; height: 62px; place-items: center; margin-bottom: 14px; border: 1px solid #eadff8; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(85,32,146,.13); font-size: 30px; }
.agent-session-transition small { color: #a06a10; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.agent-session-transition strong { margin-top: 7px; color: #202b3c; font-size: 23px; }
.agent-session-transition i { width: 260px; height: 4px; margin-top: 22px; overflow: hidden; border-radius: 999px; background: #e4e8ed; }
.agent-session-transition i b { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#e0aa33,#38b288); animation: agent-session-progress 1.15s ease-in-out infinite alternate; }
.agent-session-transition p { margin: 13px 0 0; color: #7b8798; font-size: 11px; }
@keyframes agent-session-progress { from { transform: translateX(-20%); } to { transform: translateX(190%); } }

.agent-workspace { position: absolute; inset: var(--topbar-height) 0 0 var(--sidebar-width); overflow: auto; padding: 16px 0 0 14px; background: #f5f7fb; }
[data-agent-panel][hidden] { display: none !important; }
[data-agent-live-screen-only][hidden] { display: none !important; }
.agent-home-stage,
.agent-ai-image-page,
.agent-resale-page,
.agent-product-optimizer-page,
.agent-ai-selection-page,
.agent-ai-listing-page,
.agent-store-auth-page,
.agent-watermarks-page,
.agent-profit-page,
.agent-billing-page,
.agent-system-departments-page,
.agent-system-users-page,
.agent-account-page { width: calc(100vw - var(--sidebar-width) - 14px); min-width: 0; height: calc(100vh - var(--topbar-height) - 16px); overflow: hidden; border-radius: 14px 0 0 0; background: #eef2f8; }
.agent-home-stage iframe,
.agent-ai-image-page iframe,
.agent-resale-page iframe,
.agent-product-optimizer-page iframe,
.agent-ai-selection-page iframe,
.agent-ai-listing-page iframe,
.agent-store-auth-page iframe,
.agent-watermarks-page iframe,
.agent-profit-page iframe,
.agent-billing-page iframe,
.agent-system-departments-page iframe,
.agent-system-users-page iframe,
.agent-account-page iframe { display: block; width: 100%; height: 100%; border: 0; background: #eef2f8; }
.agent-order-page { display: grid; grid-template-rows: auto auto auto minmax(460px,1fr); width: calc(100vw - var(--sidebar-width) - 14px); min-width: 1160px; min-height: calc(100vh - var(--topbar-height) - 16px); gap: 6px; }
.order-filter-card,
.order-status-card,
.order-table-card { border: 1px solid #edf0f8; background: #fff; box-shadow: 0 3px 14px rgba(66,54,132,.04); }
.order-filter-card { display: grid; grid-template-columns: 180px 330px minmax(260px,1fr) repeat(5,max-content); align-items: center; gap: 10px; min-height: 68px; padding: 13px 16px; border-top: 2px solid #b98dfd; border-radius: 12px; }
.shop-field,
.search-field { min-width: 0; }
.field select,
.field input,
.date-range { height: 38px; border: 1px solid #d8deeb; border-radius: 4px; background: #fff; color: #465167; font-size: 14px; }
.field select { width: 100%; padding: 0 12px; }
.field input { padding: 0 12px; }
.search-field input { width: 100%; }
.date-range { display: flex; align-items: center; width: auto; padding: 0 10px; }
.date-range > span { margin-right: 8px; color: #9ba6b8; }
.date-range label { flex: 1; }
.date-range input { width: 100%; border: 0; outline: 0; color: #5a6578; }
.date-range i { padding: 0 8px; font-style: normal; color: #283143; }
.button { height: 36px; padding: 0 12px; border-radius: 8px; white-space: nowrap; font-size: 13px; font-weight: 500; cursor: pointer; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.query { background: linear-gradient(135deg,#6b79ef,#7552ca); color: #fff; box-shadow: 0 4px 10px rgba(101,87,211,.22); }
.button.secondary { border: 1px solid #e0e5f0; background: #f7f8fb; color: #657085; }
.button.muted { background: #f7f8fb; color: #c5cad4; }
.button.sync { background: #3ee6b0; color: #114c3d; }
.button.outline { border: 1px solid #6178ff; background: #fff; color: #5271e9; }
.order-sync-strip { min-height: 0; height: 0; padding: 0 24px; overflow: hidden; color: #7c8699; font-size: 12px; transition: .2s; }
.order-sync-strip.is-visible { height: 25px; padding-top: 4px; }
.order-status-card { display: flex; align-items: center; gap: 21px; min-height: 50px; padding: 0 25px; border-radius: 12px; }
.order-status-card button { position: relative; height: 49px; padding: 0 4px; background: transparent; color: #818a98; font-size: 14px; cursor: pointer; }
.order-status-card button i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #b9c8fd; }
.order-status-card button:nth-child(2) i { background: #f7ab08; }
.order-status-card button:nth-child(3) i { background: #cbb0ff; }
.order-status-card button:nth-child(4) i { background: #abcafa; }
.order-status-card button:nth-child(5) i { background: #8adbe3; }
.order-status-card button:nth-child(6) i { background: #8bdac4; }
.order-status-card button:nth-child(7) i { background: #f4b3b8; }
.order-status-card button:nth-child(8) i { background: #f4a88c; }
.order-status-card button:nth-child(9) i { background: #bfc6d0; }
.order-status-card button b { display: inline-grid; min-width: 21px; height: 20px; margin-left: 4px; place-items: center; border-radius: 10px; background: #eff1f5; color: #9aa2ae; font-size: 11px; }
.order-status-card button.is-active { color: #313847; font-weight: 700; }
.order-status-card button.is-active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px; background: #ffa600; content: ""; }
.order-status-card button.is-active b { background: #6f60d7; color: #fff; }

.order-table-card { display: grid; grid-template-rows: minmax(400px,1fr) auto auto; min-height: 0; border-radius: 12px 0 0; overflow: hidden; }
.order-table-scroll { min-height: 0; overflow: auto; }
.order-table { width: 100%; min-width: 1640px; border-collapse: collapse; }
.order-table th { height: 47px; padding: 0 13px; background: #f7f8fc; color: #293346; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
.order-table td { padding: 14px 13px; border-bottom: 1px solid #edf0f5; vertical-align: top; font-size: 12px; line-height: 1.55; }
.check-column { width: 34px; }
.product-column { min-width: 340px; }
.batch-copy { float: right; padding: 3px 10px; border: 1px solid #d6d9fd; border-radius: 6px; background: #f7f4ff; color: #7365d9; font-size: 11px; }
.order-empty { height: 310px !important; color: #a1a8b4; text-align: center; vertical-align: middle !important; }
.order-product { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 10px; }
.order-product-image { display: grid; width: 54px; height: 54px; overflow: hidden; place-items: center; border-radius: 8px; background: #eef1f7; color: #75809a; font-weight: 800; }
.order-product-image img { width: 100%; height: 100%; object-fit: cover; }
.order-product-copy strong,
.cell-stack strong { display: block; max-width: 270px; overflow: hidden; color: #253149; text-overflow: ellipsis; white-space: nowrap; }
.order-product-copy span,
.cell-stack span { display: block; margin-top: 5px; color: #7f899a; }
.status-pill { display: inline-block; margin-bottom: 5px; padding: 2px 7px; border-radius: 8px; background: #fff1cf; color: #b47500; font-size: 10px; }
.status-pill.purchased,
.status-pill.delivered { background: #daf7eb; color: #14805d; }
.status-pill.cancelled,
.status-pill.out_of_stock { background: #ffe0e2; color: #b13a49; }
.profit-positive { color: #009f72; }
.profit-negative { color: #e44e5e; }
/* Keep the original ERP information hierarchy readable in both order workspaces. */
:is(.order-table, .summary-table) { table-layout: fixed; min-width: 1640px; }
.order-col-check { width: 32px; }
.order-col-product { width: 22%; }
.order-col-owner { width: 9%; }
.order-col-money { width: 10%; }
.order-col-cost { width: 9%; }
.order-col-profit { width: 8%; }
.order-col-purchase { width: 10%; }
.order-col-logistics { width: 12%; }
.order-col-time { width: 9%; }
.order-col-actions { width: 110px; }
:is(.order-table, .summary-table) th { height: 48px; padding: 10px; background: #edf2f8; color: #536278; font-size: 14px; white-space: normal; }
:is(.order-table, .summary-table) td { padding: 20px 10px; vertical-align: middle; color: #344a57; font-size: 14px; line-height: 1.55; background: #fbfcfe; overflow-wrap: anywhere; }
:is(.order-table, .summary-table) tbody tr:hover td { background: #f3f7fb; }
:is(.order-table, .summary-table) td:first-child { vertical-align: top; padding-top: 24px; }
:is(.order-table, .summary-table) .order-product { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
:is(.order-table, .summary-table) .order-product-image { width: 62px; height: 68px; border: 1px solid #e2e8ef; background: white; }
.order-product-image img { object-fit: contain; }
.order-product-title { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 7px; }
.order-product-title strong { flex: 1; min-width: 0; max-width: none; font-size: 15px; font-weight: 700; line-height: 1.55; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-product-title .status-pill { display: inline-flex; flex: 0 0 auto; width: auto; margin: 1px 0 0; border: 1px solid #f2cd7f; padding: 2px 6px; border-radius: 6px; font-size: 12px; color: #9d6400; line-height: 20px; }
.order-product-title .status-pill.cancelled { border-color: #f3c3cb; color: #b53b51; }
.order-product-title .status-pill.delivered, .order-product-title .status-pill.purchased { border-color: #bce7d6; color: #14805d; }
.order-platform-state { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: center; margin: 0 0 9px; font-size: 12px; color: #607887; }
.order-platform-state b { padding: 2px 6px; border-radius: 5px; background: #e6f2f7; color: #2d6b7d; font-weight: 600; }
.order-product-copy .order-platform-state span { display: inline; margin: 0; color: #6b7e8a; }
.order-identifiers { display: grid; justify-items: start; gap: 6px; }
.order-identifiers > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; max-width: 100%; padding: 4px 7px; border-radius: 6px; background: #f0f4f6; color: #576c7a; font-size: 13px; }
.order-product-copy .order-copy-value, .order-copy-value { display: inline; margin: 0; color: #405a6a; font-size: 13px; overflow-wrap: anywhere; }
.order-copy-value button { display: inline-block; margin-left: 5px; padding: 1px 4px; border-radius: 3px; background: #e0f3f1; color: #147f7c; font-size: 12px; cursor: pointer; }
.order-quantity { color: #df514f; white-space: nowrap; }
.order-store-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 9px; padding: 5px 7px; border-radius: 6px; background: #edf3fa; color: #4e6c8c; font-size: 13px; }
.order-product-copy .order-store-line span { display: inline; margin: 0; color: inherit; }
.order-owner, .order-money, .order-procurement, .order-logistics, .order-time, .order-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.order-owner > span, .order-money > span, .order-procurement > span, .order-logistics > span { color: #617381; font-size: 13px; }
.order-owner strong, .order-procurement strong { font-size: 14px; }
.order-owner > b, .order-owner > em { max-width: 100%; padding: 2px 7px; border-radius: 12px; background: #e9f2fa; color: #346789; font-size: 12px; font-style: normal; font-weight: 600; }
.order-owner > em { background: #e2f4ed; color: #188570; }
.order-money > strong { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.order-money > b { color: #168264; font-size: 14px; }
.order-money > .order-finance-note { color: #a16b17; }
.order-finance-mode { display: inline-flex; padding: 2px 8px; border-radius: 14px; background: #fff2d7; color: #986412; font-size: 12px; font-style: normal; }
.order-finance-mode.actual { background: #e0f5eb; color: #187950; }
.order-finance-mode.cancelled { background: #f3e9ed; color: #965566; }
.order-logistics-card { position: relative; width: 100%; padding: 10px 40px 10px 10px; border: 1px solid #d4dcff; border-radius: 8px; background: #f0f3ff; text-align: left; color: #4657ca; cursor: pointer; }
.order-logistics-card strong { display: block; font-size: 14px; line-height: 1.5; }
.order-logistics-card span { display: block; margin-top: 5px; color: #62758a; font-size: 13px; }
.order-logistics-card em { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-style: normal; white-space: nowrap; font-size: 12px; }
.order-time > span { width: 100%; padding: 7px 8px; border: 1px solid #dce4ed; border-radius: 7px; background: #f8fbfd; color: #5a7080; font-size: 13px; }
.order-time b { display: block; font-weight: 500; font-variant-numeric: tabular-nums; }
.order-actions { align-items: stretch; gap: 8px; }
.order-actions button { min-height: 35px; padding: 7px 4px; border: 1px solid #c5d6eb; border-radius: 8px; background: #fff; color: #315f86; font-size: 13px; font-weight: 600; cursor: pointer; }
.order-actions .order-prepare { border-color: #d6a721; background: linear-gradient(#ffda71, #e9ba3c); color: #463200; }
.agent-order-detail-dialog { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid #dde5ee; border-radius: 18px; color: #304858; box-shadow: 0 24px 80px #152d4d40; }
.agent-order-detail-dialog::backdrop { background: #172b4859; }
.agent-order-detail-dialog form { padding: 24px; }
.agent-order-detail-dialog header { display: flex; justify-content: space-between; gap: 16px; }
.agent-order-detail-dialog h2 { margin: 0; font-size: 22px; }
.agent-order-detail-dialog p { color: #637383; font-size: 14px; line-height: 1.6; }
.agent-order-detail-dialog button { padding: 9px 14px; border: 1px solid #ccd8e8; border-radius: 8px; background: #f4f7fb; color: #294f6f; font-size: 14px; cursor: pointer; }
.agent-order-detail-dialog header button { align-self: flex-start; font-size: 20px; }
.agent-order-detail-dialog .order-copy-value button { padding: 2px 5px; border: 0; background: #e0f3f1; color: #147f7c; font-size: 12px; }
.order-detail-content { padding: 16px; border-radius: 12px; background: #f1f5fa; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.order-detail-content p { margin: 7px 0; }
.agent-order-detail-dialog fieldset { margin: 20px 0 0; padding: 15px; border: 1px solid #dde5ef; border-radius: 10px; }
.order-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.order-editor-grid label { display: grid; gap: 6px; font-size: 14px; }
.order-editor-grid input, .order-editor-grid select { width: 100%; height: 40px; padding: 8px; border: 1px solid #cdd9e7; border-radius: 7px; font: inherit; color: #294f6f; background: #fff; }
.agent-order-detail-dialog footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
#agentOrderDetailSave { background: #306cd6; color: #fff; border-color: #306cd6; }
#agentOrderDetailPrepare { background: #f0c34c; color: #4b360a; }
.order-list-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 55px; padding: 8px 13px; border-top: 1px solid #dce4f7; background: #fafbff; }
.batch-actions { display: flex; align-items: center; gap: 7px; }
.batch-actions button { height: 32px; padding: 0 12px; border-radius: 15px; background: #b5c5dc; color: #fff; cursor: pointer; }
.batch-actions button:nth-child(2) { background: #aabbe0; }
.batch-actions button:nth-child(3) { background: #8dc8b9; }
.batch-actions button:nth-child(4) { background: #ad9bd0; }
.batch-actions span { margin-left: 5px; color: #7d8798; font-size: 12px; }
.pagination { display: flex; align-items: center; gap: 8px; color: #7f8999; font-size: 12px; }
.pagination select { height: 34px; padding: 0 10px; border: 1px solid #dce1ec; border-radius: 4px; background: #fff; color: #657085; }
.pagination button,
.pagination b { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #e1e5ee; background: #fff; color: #6d7789; }
.pagination b { border-color: #2f83c8; background: #1177b7; color: #fff; }
.order-total-strip { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; border-top: 1px solid #f0eaff; background: linear-gradient(90deg,#fff,#faf7ff); }
.order-total-strip div { text-align: center; }
.order-total-strip strong { display: block; color: #5c55d4; font-family: Consolas,monospace; font-size: 14px; }
.order-total-strip div:nth-of-type(2) strong { color: #e25565; }
.order-total-strip div:nth-of-type(3) strong { color: #da8a0e; }
.order-total-strip div:nth-of-type(4) strong { color: #08a67d; }
.order-total-strip span { color: #99a0ae; font-size: 10px; }
.order-total-strip i { color: #a8afbd; font-style: normal; }
.order-total-strip > b { padding: 4px 12px; border-radius: 14px; background: #08b383; color: #fff; }

.agent-summary-page { display: grid; grid-template-rows: auto auto minmax(470px,1fr); width: calc(100vw - var(--sidebar-width) - 14px); min-width: 1180px; min-height: calc(100vh - var(--topbar-height) - 16px); gap: 6px; }
.summary-filter-card,
.summary-status-card,
.summary-table-card { border: 1px solid #edf0f8; background: #fff; box-shadow: 0 3px 14px rgba(66,54,132,.04); }
.summary-filter-card { display: grid; grid-template-columns: 380px 120px repeat(3,140px) minmax(260px,1fr); align-items: center; gap: 8px; min-height: 116px; padding: 16px 22px 13px; border-top: 2px solid #c379ff; border-radius: 15px; }
.summary-field { min-width: 0; }
.summary-field input,
.summary-field select,
.summary-date-range { width: 100%; height: 34px; border: 1px solid #d8deeb; border-radius: 4px; background: #fff; color: #687387; font-size: 13px; }
.summary-field input,
.summary-field select { padding: 0 10px; }
.summary-field input::placeholder { color: #a4adbc; }
.summary-date-range { display: grid; grid-template-columns: 24px minmax(120px,1fr) 28px minmax(120px,1fr); align-items: center; padding: 0 10px; }
.summary-date-range > span { color: #9ba6b8; }
.summary-date-range label { min-width: 0; }
.summary-date-range input { width: 100%; height: 32px; border: 0; outline: 0; color: #687387; font-size: 13px; }
.summary-date-range i { color: #364052; font-style: normal; text-align: center; }
.summary-filter-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; }
.summary-button { height: 34px; padding: 0 13px; border-radius: 8px; white-space: nowrap; font-size: 12px; cursor: pointer; }
.summary-button.query { background: linear-gradient(135deg,#6b79ef,#7552ca); color: #fff; box-shadow: 0 4px 11px rgba(101,87,211,.25); }
.summary-button.reset { border: 1px solid #dfe4ed; background: #f8f9fb; color: #697487; }
.summary-button.export { border: 1px solid #6178ff; background: #fff; color: #5271e9; }

.summary-status-card { display: flex; align-items: stretch; gap: 10px; min-height: 54px; padding: 4px 20px; border-radius: 13px; overflow-x: auto; }
.summary-status-card button { display: grid; flex: 0 0 102px; grid-template-columns: 34px 1fr; grid-template-rows: 23px 18px; align-items: center; height: 46px; padding: 3px 9px; border: 1px solid transparent; border-radius: 11px; background: #f8f9fb; color: #8a94a5; text-align: left; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 180ms ease; }
.summary-status-card button.is-active { border-color: color-mix(in srgb,var(--summary-icon-ink,#e89200) 72%,#fff); background: color-mix(in srgb,var(--summary-icon-soft,#fff4df) 48%,#fff); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--summary-icon-ink,#e89200) 10%,transparent), 0 5px 14px color-mix(in srgb,var(--summary-icon-ink,#e89200) 10%,transparent); }
.summary-status-card button b { align-self: end; color: #5d6dde; font-size: 13px; font-weight: 700; }
.summary-status-card button.is-active b { color: #e89200; }
.summary-status-card button i { align-self: start; color: #8d96a6; font-size: 11px; font-style: normal; }
.summary-status-icon { --summary-icon-ink:#53647c; --summary-icon-soft:#eef2f7; display: grid; grid-row: 1 / 3; width: 29px; height: 29px; place-items: center; border: 1px solid color-mix(in srgb,var(--summary-icon-ink) 18%,#fff); border-radius: 9px; background: linear-gradient(145deg,#fff 0%,var(--summary-icon-soft) 48%,color-mix(in srgb,var(--summary-icon-soft) 76%,var(--summary-icon-ink)) 100%); color: var(--summary-icon-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.92), inset 0 -1px 2px color-mix(in srgb,var(--summary-icon-ink) 8%,transparent), 0 3px 7px color-mix(in srgb,var(--summary-icon-ink) 13%,transparent); transition: translate 180ms cubic-bezier(.16,1,.3,1), box-shadow 180ms ease; }
.summary-status-icon svg { display: block; width: 16px; height: 16px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgba(255,255,255,.8)); }
.summary-status-card button:is(:hover,.is-active) .summary-status-icon { translate: 0 -1px; box-shadow: inset 0 1px 0 #fff, inset 0 -1px 2px color-mix(in srgb,var(--summary-icon-ink) 10%,transparent), 0 5px 10px color-mix(in srgb,var(--summary-icon-ink) 18%,transparent); }
.summary-status-icon.all { --summary-icon-ink:#536f99; --summary-icon-soft:#e8f0fa; }
.summary-status-icon.unpurchased { --summary-icon-ink:#b77a12; --summary-icon-soft:#fff0ce; }
.summary-status-icon.purchased { --summary-icon-ink:#7659a4; --summary-icon-soft:#eee6fa; }
.summary-status-icon.to-ship { --summary-icon-ink:#4d729f; --summary-icon-soft:#e4eef9; }
.summary-status-icon.shipped { --summary-icon-ink:#277b78; --summary-icon-soft:#def2ef; }
.summary-status-icon.delivered { --summary-icon-ink:#14904a; --summary-icon-soft:#dcf5e5; }
.summary-status-icon.out-of-stock { --summary-icon-ink:#df5149; --summary-icon-soft:#ffe7e4; }
.summary-status-icon.returned { --summary-icon-ink:#3268b2; --summary-icon-soft:#e4edfb; }
.summary-status-icon.cancelled { --summary-icon-ink:#53606f; --summary-icon-soft:#e9edf2; }
.summary-status-card button:has(.summary-status-icon) { --summary-icon-ink:#53647c; --summary-icon-soft:#eef2f7; }
.summary-status-card button:has(.summary-status-icon.unpurchased) { --summary-icon-ink:#b77a12; --summary-icon-soft:#fff0ce; }
.summary-status-card button:has(.summary-status-icon.purchased) { --summary-icon-ink:#7659a4; --summary-icon-soft:#eee6fa; }
.summary-status-card button:has(.summary-status-icon.to-ship) { --summary-icon-ink:#4d729f; --summary-icon-soft:#e4eef9; }
.summary-status-card button:has(.summary-status-icon.shipped) { --summary-icon-ink:#277b78; --summary-icon-soft:#def2ef; }
.summary-status-card button:has(.summary-status-icon.delivered) { --summary-icon-ink:#14904a; --summary-icon-soft:#dcf5e5; }
.summary-status-card button:has(.summary-status-icon.out-of-stock) { --summary-icon-ink:#df5149; --summary-icon-soft:#ffe7e4; }
.summary-status-card button:has(.summary-status-icon.returned) { --summary-icon-ink:#3268b2; --summary-icon-soft:#e4edfb; }
.summary-status-card button:has(.summary-status-icon.cancelled) { --summary-icon-ink:#53606f; --summary-icon-soft:#e9edf2; }
.summary-status-card button.is-active b { color: var(--summary-icon-ink); }

.summary-table-card { display: grid; grid-template-rows: minmax(360px,1fr) auto auto; min-height: 0; border-radius: 12px 12px 0 0; overflow: hidden; }
.summary-table-scroll { min-height: 0; overflow: auto; }
.summary-table { width: 100%; min-width: 1640px; border-collapse: collapse; }
.summary-table th { height: 48px; padding: 10px; background: #edf2f8; color: #536278; font-size: 14px; font-weight: 700; text-align: left; white-space: normal; }
.summary-table td { padding: 20px 10px; border-bottom: 1px solid #edf0f5; vertical-align: middle; font-size: 14px; line-height: 1.55; }
.summary-check-column { width: 38px; }
.summary-product-column { min-width: 350px; }
.summary-sort { margin-left: 4px; color: #aab1bf; font-size: 7px; }
.summary-empty { height: 300px; color: #9ba4b3; font-size: 12px; text-align: center; vertical-align: middle; }
.summary-owner-line { color: #6652ae !important; font-weight: 600; }
.summary-list-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 8px 12px; border-top: 1px solid #dce4f7; background: #fbfcff; }
.summary-batch-actions { display: flex; align-items: center; gap: 7px; }
.summary-batch-actions button { height: 32px; padding: 0 12px; border-radius: 14px; background: #78caea; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.summary-batch-actions button:nth-child(2) { background: #75b6df; }
.summary-batch-actions button:nth-child(3) { background: #72c6bd; }
.summary-batch-actions button:nth-child(4) { background: #69c3a7; }
.summary-batch-actions button:nth-child(5) { background: #9b82df; }
.summary-batch-actions button:disabled { cursor: not-allowed; opacity: .48; }
.summary-pagination { display: flex; align-items: center; gap: 8px; color: #667287; font-size: 12px; white-space: nowrap; }
.summary-pagination > span > b { color: #4a67dc; }
.summary-pagination select,
.summary-pagination input { height: 32px; border: 1px solid #dce1ec; border-radius: 4px; background: #fff; color: #657085; }
.summary-pagination select { width: 112px; padding: 0 10px; }
.summary-pagination input { width: 52px; padding: 0 8px; text-align: center; }
.summary-pagination button,
.summary-pagination > strong { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #e1e5ee; background: #fff; color: #6d7789; }
.summary-pagination > strong { border-color: #4296e6; background: #4296e6; color: #fff; }
.summary-pagination button:disabled { color: #c7cdd7; }
.summary-total-strip { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 52px; border-top: 1px solid #eeeaff; background: linear-gradient(90deg,#fff,#faf7ff); }
.summary-total-strip div { text-align: center; }
.summary-total-strip strong { display: block; color: #5c55d4; font-family: Consolas,monospace; font-size: 13px; }
.summary-total-strip div:nth-of-type(2) strong { color: #e25565; }
.summary-total-strip div:nth-of-type(3) strong { color: #da8a0e; }
.summary-total-strip div:nth-of-type(4) strong { color: #08a67d; }
.summary-total-strip span { color: #99a0ae; font-size: 10px; }
.summary-total-strip i { color: #a8afbd; font-style: normal; }
.summary-total-strip > b { padding: 4px 12px; border-radius: 14px; background: #08b383; color: #fff; }

.agent-manual-page,
.agent-manual-listings-page { display: grid; width: calc(100vw - var(--sidebar-width) - 14px); min-width: 1120px; min-height: calc(100vh - var(--topbar-height) - 16px); gap: 10px; }
.agent-manual-page { grid-template-rows: auto auto 480px; align-content: start; }
.agent-manual-listings-page { grid-template-rows: auto auto 310px; align-content: start; }
.manual-filter-card,
.manual-listing-filter-card,
.manual-listing-table-card { border: 1px solid #edf0f8; background: #fff; box-shadow: 0 8px 24px rgba(55,65,105,.07); }
.manual-filter-card { display: grid; grid-template-columns: minmax(260px,330px) minmax(0,1fr); align-items: center; gap: 18px; min-height: 72px; padding: 12px 20px; border-radius: 20px; }
.manual-search-group { display: grid; grid-template-columns: minmax(0,1fr) 58px; align-items: center; gap: 10px; }
.manual-search-field,
.manual-inline-search { display: flex; align-items: center; min-width: 0; height: 34px; padding: 0 12px; border: 1px solid #dfe3eb; border-radius: 9px; background: #fff; color: #a3aab5; box-shadow: 0 2px 8px rgba(40,55,90,.04); }
.manual-search-field input,
.manual-inline-search input { width: 100%; height: 32px; margin-left: 7px; border: 0; outline: 0; background: transparent; color: #465167; }
.manual-search-button { height: 34px; padding: 0 14px; border-radius: 4px; background: #378df3; color: #fff; cursor: pointer; white-space: nowrap; }
.manual-search-button:disabled { cursor: wait; opacity: .56; }
.manual-toolbar,
.manual-listing-toolbar { display: flex; align-items: center; justify-content: safe flex-end; gap: 7px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.manual-toolbar::-webkit-scrollbar,
.manual-listing-toolbar::-webkit-scrollbar { display: none; }
.manual-action { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-width: 118px; height: 48px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; color: #fff; cursor: pointer; box-shadow: 0 8px 18px rgba(48,55,96,.17), inset 0 1px 0 rgba(255,255,255,.2); text-align: left; }
.manual-action i { position: relative; display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; background: linear-gradient(145deg,rgba(255,255,255,.34),rgba(255,255,255,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 4px 9px rgba(28,34,68,.14); font-style: normal; line-height: 1; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease; }
.manual-action i::after { position: absolute; top: 3px; right: 4px; width: 8px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.45); content: ""; filter: blur(.2px); transform: rotate(-18deg); }
.manual-action i svg { position: relative; z-index: 1; display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(27,31,58,.2)); }
.manual-action:hover:not(:disabled) i { transform: translateY(-1px) scale(1.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 12px rgba(28,34,68,.2); }
.manual-action:active:not(:disabled) i { transform: translateY(0) scale(.97); }
.manual-action span { display: grid; gap: 2px; white-space: nowrap; }
.manual-action strong { font-size: 12px; }
.manual-action small { color: rgba(255,255,255,.92); font-size: 9px; }
.manual-action.green { background: linear-gradient(135deg,#11b88b,#059f77); }
.manual-action.orange { background: linear-gradient(135deg,#ffb852,#ee9130); }
.manual-action.blue { background: linear-gradient(135deg,#5f8df4,#3e65dc); }
.manual-action.red { background: linear-gradient(135deg,#f2585d,#df3039); }
.manual-action.cobalt { background: linear-gradient(135deg,#4d83ee,#3565d1); }
.manual-action.amber { background: linear-gradient(135deg,#ffb94d,#ec982f); }
.manual-action.royal { background: linear-gradient(135deg,#568af2,#3266d7); }
.manual-action.pink { background: linear-gradient(135deg,#ef4d9a,#d92c7d); }
.manual-action:disabled { cursor: not-allowed; filter: grayscale(.35); opacity: .55; }
.manual-status-card { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 68px; padding: 7px 4px; overflow-x: auto; scrollbar-width: none; }
.manual-status-card::-webkit-scrollbar { display: none; }
.manual-status-card button { display: flex; flex: 0 0 168px; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 14px; border: 1px solid #e5e8f0; border-radius: 14px; background: #fff; color: #454c5c; white-space: nowrap; cursor: pointer; box-shadow: 0 3px 10px rgba(46,57,91,.04); }
.manual-status-card button:hover { border-color: #c5b5ed; background: #faf8ff; }
.manual-status-card button:focus-visible { outline: 2px solid #9167d8; outline-offset: 2px; }
.manual-status-card button.is-active { border-color: #7953c5; background: linear-gradient(120deg,#7760cf,#8255bd); color: #fff; box-shadow: 0 5px 14px rgba(93,67,177,.18); }
.manual-status-card button > span { font-size: 14px; font-weight: 600; line-height: 20px; }
.manual-status-card .status-icon { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 10px; font-style: normal; }
.manual-status-card .status-icon svg { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.manual-status-card .status-icon.collected { color: #159b72; background: #e4f7ef; }
.manual-status-card .status-icon.favorite { color: #bf8b16; background: #fff5d8; }
.manual-status-card .status-icon.favorite svg { fill: #ffe59a; }
.manual-status-card .status-icon.blacklist { color: #e15a65; background: #ffedef; }
.manual-status-card .status-icon.no-profit { color: #6182b4; background: #eaf1fb; }
.manual-status-card .status-icon.listed { color: #427cdb; background: #eaf1ff; }
.manual-status-card button.is-active .status-icon { color: #fff; background: rgba(255,255,255,.18); }
.manual-status-card button.is-active .status-icon svg { fill: none; }
.manual-status-card button b { display: grid; flex: 0 0 auto; min-width: 25px; height: 22px; padding: 0 7px; place-items: center; border-radius: 8px; background: #f0f2f7; color: #727a8b; font-size: 11px; font-variant-numeric: tabular-nums; }
.manual-status-card button.is-active b { background: rgba(255,255,255,.24); color: #fff; }
.manual-results-card { display: grid; grid-template-rows: minmax(350px,1fr) auto; min-height: 0; gap: 12px; background: transparent; }
.manual-product-list { min-height: 0; padding: 12px; overflow: auto; border: 1px solid #edf0f8; border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(55,65,105,.05); }
.manual-product-card { display: grid; grid-template-columns: 22px 100px minmax(0,1fr) 116px; gap: 14px; min-height: 132px; margin-bottom: 10px; padding: 14px; border: 1px solid #e4e8f2; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(61,52,117,.05); }
.manual-product-card.is-selected { border-color: #7659dc; box-shadow: 0 0 0 2px rgba(118,89,220,.12); }
.manual-product-select { padding-top: 4px; }
.manual-product-select input { width: 16px; height: 16px; accent-color: #7659dc; }
.manual-product-image { display: grid; width: 100px; height: 100px; overflow: hidden; place-items: center; border-radius: 9px; background: #eef1f6; color: #7f899a; font-weight: 700; }
.manual-product-image img { width: 100%; height: 100%; object-fit: cover; }
.manual-product-main { min-width: 0; }
.manual-product-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.manual-product-title strong { overflow: hidden; color: #273149; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.manual-product-state { flex: 0 0 auto; padding: 3px 9px; border-radius: 12px; background: #efe8ff; color: #6741bd; font-size: 11px; }
.manual-product-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 9px; color: #7d8798; font-size: 12px; }
.manual-product-metrics { display: grid; grid-template-columns: repeat(5,minmax(90px,1fr)); gap: 7px; margin-top: 12px; }
.manual-product-metrics div { min-width: 0; padding: 8px 10px; border-radius: 8px; background: #f6f8fc; }
.manual-product-metrics span { display: block; color: #939cac; font-size: 10px; }
.manual-product-metrics strong { display: block; margin-top: 4px; overflow: hidden; color: #3a455a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.manual-product-actions { display: flex; align-items: stretch; justify-content: center; flex-direction: column; gap: 8px; }
.manual-product-actions a,
.manual-product-actions span { display: grid; min-height: 32px; place-items: center; border: 1px solid #dce2ef; border-radius: 8px; background: #f8f9fc; color: #5f6c81; font-size: 11px; text-decoration: none; }
.manual-product-actions a { border-color: #8065dc; background: #8065dc; color: #fff; }
.manual-product-actions a.supplier { border-color: #efad31; background: #fff9ea; color: #9c6500; }
.manual-empty { display: grid; min-height: 320px; place-content: center; gap: 7px; color: #9ca4b2; text-align: center; }
.manual-empty::before,
.manual-listing-empty-state::before { content: ""; display: block; width: 52px; height: 52px; margin: 0 auto 2px; background: center / 52px 52px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52' fill='none'%3E%3Ccircle cx='22' cy='22' r='16.5' stroke='%23969aa2' stroke-width='4'/%3E%3Cpath d='m34.5 34.5 11 11' stroke='%23969aa2' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.manual-empty::after,
.manual-listing-empty-state::after { content: none; }
.manual-empty strong { color: #778194; }
.manual-empty.error strong,
.manual-listing-empty.error strong { color: #b84150; }
.manual-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 54px; padding: 8px 18px; border: 1px solid #edf0f8; border-radius: 16px; background: #fff; color: #697284; font-size: 12px; box-shadow: 0 6px 18px rgba(55,65,105,.05); }
.manual-pagination-split { justify-content: space-between; }
.manual-pagination-split > div { display: flex; align-items: center; gap: 12px; }
.manual-pagination-split > div:first-child strong { padding: 6px 10px; border-radius: 14px; background: #eef4ff; color: #356ce8; font-size: 12px; }
.manual-pagination select { height: 32px; padding: 0 10px; border: 1px solid #dce1ec; border-radius: 4px; background: #fff; color: #657085; }
.manual-pagination input { width: 56px; height: 32px; border: 1px solid #dce1ec; border-radius: 4px; text-align: center; }
.manual-pagination button,
.manual-pagination b { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #e1e5ee; background: #fff; color: #6d7789; }
.manual-pagination b { border-color: #4296e6; background: #4296e6; color: #fff; }
.manual-pagination button:disabled { color: #c8ced8; }
.manual-listing-filter-card { display: grid; grid-template-columns: 120px 150px 150px 200px minmax(320px,1fr) 60px; align-items: center; gap: 10px; min-height: 120px; padding: 12px 20px; border-radius: 20px; }
.manual-listing-filter-card input,
.manual-listing-filter-card select { width: 100%; height: 34px; padding: 0 11px; border: 1px solid #d8deeb; border-radius: 5px; background: #fff; color: #777f8e; }
.manual-date-range { display: grid; grid-template-columns: 18px minmax(120px,1fr) 24px minmax(120px,1fr); align-items: center; height: 34px; padding: 0 8px; border: 1px solid #d8deeb; border-radius: 5px; color: #9aa2ae; }
.manual-date-range input { height: 30px; padding: 0 4px; border: 0; outline: 0; }
.manual-date-range em { color: #383e48; font-style: normal; text-align: center; }
.manual-listing-toolbar { grid-column: 1 / -1; justify-content: flex-start; }
.manual-listing-toolbar .manual-action { min-width: 132px; }
.manual-listing-stats { display: grid; grid-template-columns: repeat(4,minmax(170px,1fr)); gap: 12px; }
.manual-listing-stats button { --listing-stat-color: #4f6f9f; --listing-stat-soft: #dce9fb; display: flex; align-items: center; justify-content: flex-start; gap: 22px; height: 76px; padding: 8px 22px; border: 2px solid transparent; border-radius: 16px; background: #fff; color: #758096; cursor: pointer; box-shadow: 0 6px 16px rgba(55,65,105,.06); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.2,.8,.2,1); }
.manual-listing-stats button[data-manual-listing-status="pending"] { --listing-stat-color: #b26d00; --listing-stat-soft: #ffedb7; }
.manual-listing-stats button[data-manual-listing-status="submitted"] { --listing-stat-color: #078b57; --listing-stat-soft: #c8f4dc; }
.manual-listing-stats button[data-manual-listing-status="failed"] { --listing-stat-color: #c23f47; --listing-stat-soft: #ffd4d8; }
.manual-listing-stats button:hover { border-color: color-mix(in srgb,var(--listing-stat-color) 30%,transparent); background: color-mix(in srgb,var(--listing-stat-soft) 28%,#fff); box-shadow: 0 9px 20px color-mix(in srgb,var(--listing-stat-color) 12%,transparent); transform: translateY(-1px); }
.manual-listing-stats button.is-active { border-color: color-mix(in srgb,var(--listing-stat-color) 72%,#fff); background: linear-gradient(120deg,color-mix(in srgb,var(--listing-stat-soft) 42%,#fff),#fff); box-shadow: 0 9px 22px color-mix(in srgb,var(--listing-stat-color) 15%,transparent), inset 0 1px 0 #fff; }
.manual-listing-stats button > i { position: relative; display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb,var(--listing-stat-color) 20%,#fff); border-radius: 13px; background: linear-gradient(145deg,#fff 0%,var(--listing-stat-soft) 48%,color-mix(in srgb,var(--listing-stat-soft) 82%,var(--listing-stat-color)) 100%); color: var(--listing-stat-color); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -3px 7px color-mix(in srgb,var(--listing-stat-color) 10%,transparent), 0 6px 13px color-mix(in srgb,var(--listing-stat-color) 18%,transparent); font-style: normal; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease; }
.manual-listing-stats button > i::after { position: absolute; top: 5px; right: 6px; width: 10px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.8); content: ""; transform: rotate(-20deg); }
.manual-listing-stats button > i svg { position: relative; z-index: 1; display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(25,38,66,.14)); }
.manual-listing-stats button:hover > i,
.manual-listing-stats button.is-active > i { transform: translateY(-1px) scale(1.035); box-shadow: inset 0 1px 0 #fff, inset 0 -3px 7px color-mix(in srgb,var(--listing-stat-color) 12%,transparent), 0 8px 16px color-mix(in srgb,var(--listing-stat-color) 22%,transparent); }
.manual-listing-stats button span { display: grid; gap: 3px; text-align: center; }
.manual-listing-stats strong { color: #222b3b; font-size: 23px; line-height: 1; }
.manual-listing-stats small { font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
  .agent-menu > a,
  .agent-menu-parent,
  .agent-menu-group,
  .agent-menu-icon,
  .agent-menu-chevron,
  .agent-menu-link-arrow,
  .agent-submenu,
  .agent-submenu-inner,
  .agent-submenu button,
  .agent-submenu a,
  .manual-action i,
  .manual-listing-stats button,
  .manual-listing-stats button > i { transition: none; }
  .agent-menu-parent:hover .agent-menu-icon,
  .agent-menu > a:hover .agent-menu-icon,
  .agent-menu-group.is-open .agent-menu-icon,
  .agent-menu > a:hover .agent-menu-link-arrow,
  .manual-action:hover:not(:disabled) i,
  .manual-action:active:not(:disabled) i,
  .manual-listing-stats button:hover,
  .manual-listing-stats button:hover > i,
  .manual-listing-stats button.is-active > i { transform: none; }
}
.manual-listing-table-card { display: grid; grid-template-rows: minmax(220px,1fr) auto; min-height: 0; border-radius: 16px; overflow: hidden; }
.manual-listing-table-scroll { min-height: 0; overflow: auto; }
.manual-listing-table { width: 100%; min-width: 1450px; border-collapse: collapse; }
.manual-listing-table th { height: 38px; padding: 0 13px; background: #f7f8fa; color: #7c828d; font-size: 12px; text-align: center; white-space: nowrap; }
.manual-listing-table td { padding: 13px; border-bottom: 1px solid #edf0f5; color: #5e697c; font-size: 12px; text-align: center; vertical-align: middle; }
.manual-listing-table tr.is-selected td { background: #f6f3ff; }
.manual-listing-thumb { display: grid; width: 46px; height: 46px; overflow: hidden; place-items: center; margin: auto; border-radius: 7px; background: #eef1f6; color: #7f899a; font-size: 9px; }
.manual-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manual-listing-name { display: block; max-width: 260px; overflow: hidden; color: #2f394d; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.manual-listing-state { display: inline-block; padding: 4px 9px; border-radius: 12px; background: #fff2ce; color: #a46d00; }
.manual-listing-state.success { background: #daf7eb; color: #14805d; }
.manual-listing-state.failed { background: #ffe0e2; color: #b13a49; }
.manual-financial span,
.manual-financial strong { display: block; margin: 3px 0; white-space: nowrap; }
.manual-financial strong { color: #14916b; }
.manual-record-actions { display: flex; gap: 6px; }
.manual-record-actions a { padding: 4px 8px; border: 1px solid #d5dcf0; border-radius: 6px; color: #536ed8; text-decoration: none; }
.manual-listing-empty { height: 290px; color: #9ca4b2 !important; text-align: center; }
.manual-listing-empty-state { position: sticky; left: 0; display: grid; width: calc(100vw - var(--sidebar-width) - 18px); min-height: 210px; place-content: center; }
.manual-listing-empty strong,
.manual-listing-empty span { display: block; margin: 5px; }
.agent-toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 420px; padding: 12px 18px; border-radius: 9px; background: #172235; color: #fff; box-shadow: 0 12px 35px rgba(12,23,42,.28); font-size: 13px; }
.agent-toast.error { background: #b84150; }

.agent-support-page { display: grid; width: calc(100vw - var(--sidebar-width) - 28px); min-width: 980px; height: calc(100vh - var(--topbar-height) - 22px); grid-template-rows: auto auto minmax(260px,1fr); gap: 12px; }
.support-filter-card,
.support-metrics article,
.support-table-card { border: 1px solid #e7eaf2; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(35,48,75,.06); }
.support-filter-card { padding: 12px 16px; }
.support-filter-row { display: flex; align-items: center; gap: 8px; min-height: 38px; overflow-x: auto; border-bottom: 1px solid #eef0f5; white-space: nowrap; }
.support-filter-row > span { min-width: 44px; color: #6c7484; font-weight: 700; }
.support-filter-row button { padding: 7px 12px; border: 0; border-radius: 18px; background: #f5f6fa; color: #343c4d; cursor: pointer; }
.support-filter-row button.is-active { background: #6c49e8; color: #fff; box-shadow: 0 5px 14px rgba(108,73,232,.22); }
.support-filter-row button b { margin-left: 4px; font-weight: 700; }
.support-types { border: 0; }
.support-search-row { display: flex; gap: 10px; margin-top: 10px; }
.support-search-row label { display: flex; flex: 1; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid #dfe4ee; border-radius: 8px; }
.support-search-row input { width: 100%; border: 0; outline: 0; }
.support-search-row button { padding: 0 18px; border: 1px solid #dfe4ee; border-radius: 8px; background: #fff; color: #4b5568; cursor: pointer; }
.support-search-row #agentSupportQuery { border-color: #4a98f7; background: #4a98f7; color: #fff; }
.support-metrics { display: grid; grid-template-columns: repeat(4,minmax(160px,1fr)); gap: 12px; }
.support-metrics article { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 28px 20px; align-items: center; min-height: 74px; padding: 10px 18px; }
.support-metrics i { grid-row: 1 / 3; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #eee9ff; color: #6143d7; font-style: normal; }
.support-metrics strong { color: #222a38; font-size: 24px; }
.support-metrics span { color: #7a8496; font-size: 12px; }
.support-table-card { display: grid; min-height: 0; grid-template-rows: minmax(220px,1fr) auto; overflow: hidden; }
.support-table-scroll { min-height: 0; overflow: auto; }
.support-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.support-table th { height: 42px; padding: 0 14px; background: #f7f8fb; color: #70798a; font-size: 12px; text-align: left; }
.support-table td { padding: 14px; border-bottom: 1px solid #edf0f5; color: #5c6678; font-size: 12px; vertical-align: middle; }
.support-table tr.has-unread td { background: #fbf9ff; }
.support-order-cell { display: grid; max-width: 360px; grid-template-columns: 46px minmax(0,1fr); gap: 10px; }
.support-order-cell img,
.support-order-placeholder { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 8px; background: #eff2f8; object-fit: cover; }
.support-order-cell div { min-width: 0; }
.support-order-cell strong,
.support-order-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-order-cell strong { color: #263045; }
.support-order-cell span { margin-top: 4px; color: #8a93a3; }
.support-unread { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 5px; border-radius: 9px; background: #f05272; color: #fff; font-size: 10px; }
.support-state { display: inline-block; padding: 5px 10px; border-radius: 14px; background: #fff2ce; color: #9a6b00; }
.support-state.processing { background: #e8efff; color: #3666cb; }
.support-state.waiting_customer { background: #f0eaff; color: #6b47c8; }
.support-state.resolved { background: #dbf7ec; color: #15835f; }
.support-state.closed { background: #edf0f4; color: #70798a; }
.support-open,
.summary-ticket-action { border: 1px solid #7655e6; border-radius: 7px; background: #fff; color: #6543d4; cursor: pointer; }
.support-open { padding: 6px 11px; }
.summary-ticket-action { margin-top: 6px; padding: 4px 8px; font-size: 11px; }
.support-empty { height: 240px; color: #a0a8b5 !important; text-align: center; }
.support-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 9px; min-height: 54px; padding: 0 16px; border-top: 1px solid #edf0f5; }
.support-pagination select,
.support-pagination button { height: 32px; border: 1px solid #dfe4ee; border-radius: 6px; background: #fff; }
.support-pagination b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 6px; background: #5f47d6; color: #fff; }
.support-compose-dialog,
.support-detail-dialog { max-width: none; border: 0; border-radius: 20px; padding: 0; background: transparent; box-shadow: 0 28px 80px rgba(20,27,48,.35); }
.support-compose-dialog::backdrop,
.support-detail-dialog::backdrop { background: rgba(23,28,43,.48); backdrop-filter: blur(5px); }
.support-compose-card { display: grid; width: min(560px,calc(100vw - 28px)); gap: 14px; padding: 24px; border-radius: 20px; background: #fff; }
.support-compose-card header,
.support-detail-card > header { display: flex; justify-content: space-between; gap: 16px; }
.support-compose-card header small,
.support-detail-card > header small { color: #7252da; font-weight: 800; letter-spacing: .12em; }
.support-compose-card h2,
.support-detail-card h2 { margin: 5px 0; color: #1f2938; }
.support-compose-card p,
.support-detail-card header p { margin: 0; color: #7a8496; }
.support-compose-card header button,
.support-detail-card > header button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f3f7; cursor: pointer; }
.support-compose-card label { display: grid; gap: 7px; color: #40495a; font-size: 13px; font-weight: 700; }
.support-compose-card input,
.support-compose-card select,
.support-compose-card textarea,
#agentSupportReply,
#agentSupportStatus { border: 1px solid #dce2ed; border-radius: 9px; padding: 10px 12px; font: inherit; outline: 0; resize: vertical; }
.support-compose-card input:focus,
.support-compose-card textarea:focus,
#agentSupportReply:focus { border-color: #7050e2; box-shadow: 0 0 0 3px rgba(112,80,226,.1); }
#agentSupportComposeError { min-height: 18px; color: #c43f50; }
.support-compose-card footer { display: flex; justify-content: flex-end; gap: 10px; }
.support-compose-card footer button,
#agentSupportReplyForm button { padding: 10px 18px; border: 0; border-radius: 9px; cursor: pointer; }
#agentSupportComposeSubmit,
#agentSupportReplyForm button[type="submit"] { background: #6545d8; color: #fff; }
.support-detail-card { width: min(940px,calc(100vw - 28px)); max-height: min(760px,calc(100vh - 28px)); overflow: hidden; border-radius: 20px; background: #fff; }
.support-detail-card > header { padding: 22px 24px; border-bottom: 1px solid #eceff4; }
.support-detail-body { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 480px; max-height: calc(100vh - 150px); }
.support-detail-body > aside { padding: 20px; background: #f8f9fc; color: #677184; font-size: 13px; }
.support-detail-body > aside strong,
.support-detail-body > aside span { display: block; margin-bottom: 8px; }
.support-detail-body > aside strong { color: #252e3e; font-size: 15px; }
.support-detail-body > section { display: grid; min-height: 0; grid-template-rows: minmax(260px,1fr) auto; }
.support-message-list { overflow: auto; padding: 20px; }
.support-message { display: grid; max-width: 78%; gap: 5px; margin: 0 0 16px; }
.support-message.mine { margin-left: auto; justify-items: end; }
.support-message p { margin: 0; padding: 11px 14px; border-radius: 12px 12px 12px 3px; background: #f0f2f7; color: #344054; white-space: pre-wrap; }
.support-message.mine p { border-radius: 12px 12px 3px 12px; background: #6b4cda; color: #fff; }
.support-message.status { max-width: 100%; justify-items: center; color: #8992a2; }
.support-message.status p { padding: 6px 10px; border-radius: 12px; background: #f4f5f7; color: #7b8494; font-size: 11px; }
.support-message small { color: #929baa; }
#agentSupportReplyForm { display: grid; gap: 9px; padding: 14px 18px 18px; border-top: 1px solid #eceff4; }
#agentSupportReplyForm > div { display: flex; justify-content: flex-end; gap: 9px; }

@media (max-width: 1100px) {
  .agent-support-page { width: calc(100vw - var(--sidebar-width) - 8px); min-width: 0; }
  .support-metrics { grid-template-columns: repeat(2,1fr); }
  .support-detail-body { grid-template-columns: 1fr; }
  .support-detail-body > aside { display: none; }
}

/* Shared panel mode: Miaora reuses this exact order workspace inside its own shell. */
html[data-agent-panel-only="true"],
html[data-agent-panel-only="true"] body {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}
html[data-agent-panel-only="true"] { --sidebar-width: 0px; --topbar-height: 0px; }
html[data-agent-panel-only="true"] .agent-sidebar,
html[data-agent-panel-only="true"] .agent-topbar,
html[data-agent-panel-only="true"] .agent-session-transition { display: none !important; }
html[data-agent-panel-only="true"] .agent-workspace {
  inset: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}
html[data-agent-panel-only="true"] .agent-order-page,
html[data-agent-panel-only="true"] .agent-summary-page {
  width: 100%;
  min-width: 0;
  height: 100dvh;
  min-height: 0;
}

@media (max-width: 1450px) {
  #agentOrderSyncSelected { display: none; }
  .order-filter-card { grid-template-columns: 170px 310px minmax(240px,1fr) repeat(4,max-content); }
  .summary-filter-card { grid-template-columns: 330px 110px repeat(3,130px) minmax(240px,1fr); }
  .manual-filter-card { grid-template-columns: 280px minmax(0,1fr); }
  .manual-toolbar .manual-action { min-width: 48px; }
  .manual-toolbar .manual-action span { display: none; }
}
@media (max-height: 760px) {
  :root { --topbar-height: 56px; }
  .agent-brand { height: 58px; margin-top: 7px; margin-bottom: 6px; }
  .agent-brand-mark { width: 39px; height: 39px; flex-basis: 39px; }
  .agent-menu { padding-top: 0; }
  .agent-menu > a { height: 46px; }
  .agent-menu-group.is-open .agent-menu-parent { height: 44px; }
  .agent-submenu button { height: 34px; }
  .agent-sidebar-token-card { min-height: 62px; padding-block: 9px; }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 74px; }
  html, body { min-width: 390px; }
  .agent-brand { justify-content: center; height: 58px; margin: 8px 7px 7px; padding: 0; border-radius: 14px; }
  .agent-brand-mark { width: 41px; height: 41px; flex-basis: 41px; margin: 0; }
  .agent-brand-copy,
  .agent-menu > a > span:nth-child(2),
  .agent-menu-link-arrow,
  .agent-menu-parent > span:nth-child(2),
  .agent-menu-chevron,
  .agent-submenu { display: none; }
  .agent-menu-group.is-open .agent-submenu { display: grid; grid-template-rows: 1fr; opacity: 1; translate: 0 0; visibility: visible; pointer-events: auto; }
  .agent-menu-group .agent-submenu-inner { display: grid; gap: 2px; padding: 2px 0 6px; }
  .agent-menu-group .agent-submenu button,
  .agent-menu-group .agent-submenu a { height: auto; min-height: 40px; padding: 8px 2px; text-align: center; white-space: normal; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
  .agent-menu { padding-inline: 7px; }
  .agent-menu > a,
  .agent-menu-parent { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .agent-menu > a.is-active { box-shadow: inset 0 -3px 0 #f0cf6b; }
  .agent-menu-group.is-open { border: 0; }
  .agent-sidebar-token-card { gap: 4px; min-height: 58px; margin: 0 7px 8px; padding: 8px 3px; text-align: center; }
  .agent-sidebar-token-card > span { font-size: 9px; }
  .agent-sidebar-token-card strong { display: grid; justify-items: center; gap: 1px; font-size: 10px; white-space: normal; }
  .agent-sidebar-token-card strong b { max-width: 62px; font-size: 13px; }
  .agent-sidebar-token-card strong small { font-size: 8px; }
  .agent-topbar { padding-inline: 8px; gap: 4px; }
  .download-action { width: 38px; justify-content: center; padding: 0; }
  .download-action > span { display: none; }
  .agent-plugin-popover { right: 72px; width: min(390px,calc(100vw - 88px)); }
  .profile-action strong { display: none; }
  .agent-profile-menu { position: fixed; top: calc(var(--topbar-height) + 8px); right: 10px; width: min(300px,calc(100vw - 20px)); }
  .agent-auth-dialog { width: calc(100vw - 20px); height: calc(100vh - 20px); }
  body.agent-auth-active .agent-auth-dialog { width: 100vw; height: 100vh; }
  .agent-auth-card > header { min-height: 68px; padding: 10px 14px; }
  .agent-auth-card > header strong { font-size: 17px; }
  .agent-auth-card > header small { display: none; }
  .agent-workspace { padding-left: 8px; }
  .agent-order-page { width: calc(100vw - var(--sidebar-width) - 8px); min-width: 0; }
  .agent-summary-page { width: calc(100vw - var(--sidebar-width) - 8px); min-width: 0; }
  .agent-manual-page,
  .agent-manual-listings-page,
  .agent-ai-image-page,
  .agent-resale-page,
  .agent-product-optimizer-page,
  .agent-ai-selection-page,
  .agent-ai-listing-page,
  .agent-store-auth-page,
  .agent-watermarks-page,
  .agent-profit-page,
  .agent-billing-page,
  .agent-system-departments-page,
  .agent-system-users-page,
  .agent-account-page { width: calc(100vw - var(--sidebar-width) - 8px); min-width: 0; }
  .order-filter-card { grid-template-columns: 160px minmax(230px,1fr) max-content max-content; }
  .order-filter-card .search-field { grid-column: 1 / 3; grid-row: 2; }
  .order-filter-card .button.query { grid-column: 3; grid-row: 1; }
  .order-filter-card .button.secondary { grid-column: 4; grid-row: 1; }
  .order-filter-card .button.sync { grid-column: 3; grid-row: 2; }
  .order-filter-card .button.outline { grid-column: 4; grid-row: 2; }
  .order-status-card { overflow-x: auto; }
  .order-status-card button { flex: 0 0 auto; }
  .order-list-footer { flex-wrap: wrap; }
  .summary-filter-card { grid-template-columns: minmax(250px,1fr) repeat(2,minmax(150px,.55fr)); }
  .summary-date-range { grid-column: 1 / 2; }
  .summary-keyword { grid-column: 1 / 3; }
  .summary-filter-actions { grid-column: 3; grid-row: 3; }
  .summary-list-footer { align-items: flex-start; flex-direction: column; }
  .summary-pagination { width: 100%; justify-content: flex-end; overflow-x: auto; }
  .manual-filter-card { grid-template-columns: minmax(230px,300px) minmax(0,1fr); }
  .manual-status-card { justify-content: flex-start; }
  .manual-product-card { grid-template-columns: 22px 82px minmax(0,1fr); }
  .manual-product-image { width: 82px; height: 82px; }
  .manual-product-actions { grid-column: 2 / -1; flex-direction: row; justify-content: flex-end; }
  .manual-product-actions a,
  .manual-product-actions span { min-width: 110px; }
  .manual-product-metrics { grid-template-columns: repeat(3,minmax(90px,1fr)); }
  .manual-listing-filter-card { grid-template-columns: 120px 140px minmax(230px,1fr) 60px; }
  .manual-listing-filter-card > label:nth-child(4) { grid-column: 1 / 3; grid-row: 2; }
  .manual-date-range { grid-column: 3 / 5; grid-row: 2; }
  .manual-listing-toolbar { grid-row: 3; }
  .manual-listing-stats { display: flex; overflow-x: auto; }
  .manual-listing-stats button { flex: 0 0 190px; }
  .manual-pagination { overflow-x: auto; }
}

.agent-warehouse-page { display: grid; gap: 12px; width: calc(100vw - var(--sidebar-width) - 28px); min-width: 980px; padding: 16px; color: #263147; }
.agent-warehouse-page[hidden] { display: none; }
.warehouse-toolbar-card,
.warehouse-table-card,
.warehouse-metrics article { border: 1px solid rgba(134,146,176,.2); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 10px 24px rgba(54,66,98,.08); }
.warehouse-toolbar-card { display: grid; grid-template-columns: minmax(220px,1fr) auto; gap: 16px; padding: 18px 20px; }
.warehouse-toolbar-heading { display: grid; gap: 3px; }
.warehouse-toolbar-heading > span { color: #6d50df; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.warehouse-toolbar-heading strong { font-size: 22px; }
.warehouse-toolbar-heading small { color: #7d8799; }
.warehouse-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.warehouse-action { height: 38px; border: 1px solid #d9deea; border-radius: 9px; padding: 0 14px; background: #fff; color: #4d5870; font-weight: 700; cursor: pointer; }
.warehouse-action.primary { border-color: #6848dc; background: #6848dc; color: #fff; }
.warehouse-action.ghost { background: #f5f3ff; color: #6547d5; }
.warehouse-filters { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(300px,1fr) 190px 160px auto auto; gap: 9px; padding-top: 14px; border-top: 1px solid #edf0f5; }
.warehouse-filters label { display: flex; align-items: center; gap: 8px; height: 40px; border: 1px solid #dfe4ed; border-radius: 9px; padding: 0 12px; }
.warehouse-filters input { min-width: 0; flex: 1; border: 0; outline: 0; font: inherit; }
.warehouse-filters select,
.warehouse-filters button { height: 40px; border: 1px solid #dfe4ed; border-radius: 9px; padding: 0 12px; background: #fff; font: inherit; }
.warehouse-filters button { cursor: pointer; color: #6750d7; font-weight: 700; }
.warehouse-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.warehouse-metrics article { display: flex; align-items: center; gap: 13px; min-height: 78px; padding: 14px 18px; }
.warehouse-metrics i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #eeeaff; color: #6246d3; font-style: normal; font-size: 20px; }
.warehouse-metrics article:nth-child(2) i { background: #e2f8ed; color: #159b70; }
.warehouse-metrics article:nth-child(3) i { background: #fff2d9; color: #d58a14; }
.warehouse-metrics article:nth-child(4) i { background: #dff6f0; color: #0b9a79; }
.warehouse-metrics span { display: grid; }
.warehouse-metrics strong { font-size: 24px; }
.warehouse-metrics small { color: #7f899a; }
.warehouse-table-card { min-height: 430px; overflow: hidden; }
.warehouse-table-scroll { min-height: 370px; overflow: auto; }
.warehouse-table { width: 100%; min-width: 1240px; border-collapse: collapse; }
.warehouse-table th { height: 44px; padding: 0 12px; background: #f6f7fb; color: #7a8495; text-align: left; font-size: 12px; white-space: nowrap; }
.warehouse-table td { padding: 12px; border-top: 1px solid #edf0f4; color: #4f5b70; vertical-align: middle; }
.warehouse-product { display: grid; grid-template-columns: 46px minmax(150px,1fr); gap: 10px; align-items: center; }
.warehouse-product-media { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 9px; background: #eef1f6; color: #8b93a2; }
.warehouse-product-media img { width: 100%; height: 100%; object-fit: cover; }
.warehouse-product strong,
.warehouse-product small { display: block; }
.warehouse-product strong { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #273248; }
.warehouse-product small { margin-top: 4px; color: #9099aa; }
.warehouse-status { display: inline-flex; align-items: center; min-height: 25px; border-radius: 20px; padding: 0 10px; background: #eeeaff; color: #6246d3; font-size: 12px; font-weight: 700; }
.warehouse-status.shelved,
.warehouse-status.received { background: #dff7ef; color: #098763; }
.warehouse-status.in_transit { background: #fff1d7; color: #b9740b; }
.warehouse-status.outbound { background: #edf0f4; color: #747d8d; }
.warehouse-edit { border: 1px solid #dcd7f8; border-radius: 7px; padding: 6px 11px; background: #f7f5ff; color: #6546d2; font-weight: 700; cursor: pointer; }
.warehouse-empty { height: 280px; color: #929aaa; text-align: center; }
.warehouse-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 58px; border-top: 1px solid #edf0f4; padding: 0 18px; }
.warehouse-pagination span { margin-right: auto; }
.warehouse-pagination select,
.warehouse-pagination button,
.warehouse-pagination b { height: 34px; min-width: 34px; border: 1px solid #dde2eb; border-radius: 7px; background: #fff; color: #596478; }
.warehouse-pagination b { display: grid; place-items: center; border-color: #6a4adb; background: #6a4adb; color: #fff; }
.warehouse-entry-dialog { border: 0; padding: 0; background: transparent; }
.warehouse-entry-dialog::backdrop { background: rgba(24,31,50,.55); backdrop-filter: blur(5px); }
.warehouse-entry-card { width: min(720px,calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto; border-radius: 18px; padding: 22px; background: #fff; box-shadow: 0 28px 80px rgba(20,26,45,.3); }
.warehouse-entry-card > header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.warehouse-entry-card > header small { color: #6b4dda; font-weight: 800; letter-spacing: .12em; }
.warehouse-entry-card > header h2 { margin: 4px 0; color: #202a3b; }
.warehouse-entry-card > header p { margin: 0; color: #7c8799; }
.warehouse-entry-card > header button { border: 0; background: transparent; color: #7d8798; font-size: 24px; cursor: pointer; }
.warehouse-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.warehouse-entry-grid label { display: grid; gap: 6px; color: #4f5a70; font-size: 13px; font-weight: 700; }
.warehouse-entry-grid label.wide { grid-column: 1 / -1; }
.warehouse-entry-grid input,
.warehouse-entry-grid select,
.warehouse-entry-grid textarea { border: 1px solid #dce2ec; border-radius: 9px; padding: 10px 12px; outline: 0; font: inherit; resize: vertical; }
.warehouse-entry-grid input:focus,
.warehouse-entry-grid textarea:focus { border-color: #7050e2; box-shadow: 0 0 0 3px rgba(112,80,226,.1); }
#agentWarehouseEntryError { min-height: 18px; color: #c43f50; }
.warehouse-entry-card > footer { display: flex; justify-content: flex-end; gap: 10px; }
.warehouse-entry-card > footer button { border: 1px solid #dce1ea; border-radius: 9px; padding: 10px 18px; background: #fff; cursor: pointer; }
#agentWarehouseEntrySubmit { border-color: #6647d8; background: #6647d8; color: #fff; }
.summary-warehouse-action { margin-top: 4px; border: 1px solid #ccefe5; border-radius: 7px; padding: 5px 9px; background: #eafaf5; color: #087e61; font-size: 11px; font-weight: 700; cursor: pointer; }

@media (max-width: 1100px) {
  .agent-warehouse-page { width: calc(100vw - var(--sidebar-width) - 8px); min-width: 0; }
  .warehouse-toolbar-card { grid-template-columns: 1fr; }
  .warehouse-toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .warehouse-filters { grid-template-columns: minmax(220px,1fr) repeat(2,minmax(130px,.5fr)); }
  .warehouse-filters button { width: max-content; }
  .warehouse-metrics { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .warehouse-entry-grid { grid-template-columns: 1fr; }
  .warehouse-entry-grid label.wide { grid-column: auto; }
}

.agent-system-stores-page { display: grid; width: calc(100vw - var(--sidebar-width) - 28px); min-width: 980px; min-height: calc(100vh - var(--topbar-height) - 30px); grid-template-rows: auto auto auto minmax(430px,1fr); gap: 12px; padding: 14px; color: #1f2b42; }
.system-store-hero { display: flex; min-height: 190px; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; border-radius: 20px; padding: 28px 34px; background: radial-gradient(circle at 84% 15%,rgba(92,144,255,.8),transparent 35%),linear-gradient(120deg,#17233d 0%,#254482 55%,#3d7cf0 100%); color: #fff; box-shadow: 0 18px 45px rgba(35,67,132,.22); }
.system-store-hero > div { max-width: 760px; }
.system-store-hero p { margin: 0 0 8px; color: #ffd75f; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.system-store-hero h1 { margin: 0 0 10px; font-size: 34px; }
.system-store-hero span { color: rgba(255,255,255,.82); line-height: 1.7; }
.system-store-hero article { display: grid; min-width: 140px; min-height: 92px; place-content: center; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.1); text-align: center; backdrop-filter: blur(10px); }
.system-store-hero article strong { font-size: 31px; }
.system-store-hero article small { margin-top: 3px; color: rgba(255,255,255,.76); }
.system-store-toolbar { display: grid; grid-template-columns: minmax(240px,1fr) 180px 150px auto auto auto; align-items: end; gap: 10px; border: 1px solid #e1e6ef; border-radius: 16px; padding: 16px 18px; background: #fff; box-shadow: 0 8px 24px rgba(54,66,98,.07); }
.system-store-toolbar label { display: grid; min-width: 0; gap: 6px; color: #758097; font-size: 12px; }
.system-store-toolbar input,
.system-store-toolbar select,
.system-store-toolbar button { height: 40px; border: 1px solid #dce2ec; border-radius: 9px; padding: 0 12px; background: #fff; color: #4c5870; font: inherit; outline: 0; }
.system-store-toolbar input:focus,
.system-store-toolbar select:focus { border-color: #5d74e9; box-shadow: 0 0 0 3px rgba(93,116,233,.1); }
.system-store-toolbar button { cursor: pointer; font-weight: 700; }
#agentManagedStoreQuery { border-color: #397cf0; background: #397cf0; color: #fff; }
#agentManagedStoreRefresh { border-color: #bcd5ff; background: #eef5ff; color: #2764c9; }
.system-store-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.system-store-metrics article { display: flex; min-height: 72px; align-items: center; justify-content: space-between; border: 1px solid #e1e6ef; border-radius: 14px; padding: 14px 20px; background: #fff; box-shadow: 0 8px 22px rgba(54,66,98,.06); }
.system-store-metrics span { color: #738096; font-size: 13px; }
.system-store-metrics strong { color: #24385f; font-size: 26px; }
.system-store-metrics article:nth-child(2) strong { color: #d48a11; }
.system-store-metrics article:nth-child(3) strong { color: #5e45d5; }
.system-store-table-card { display: grid; grid-template-rows: minmax(350px,1fr) 58px; min-height: 430px; overflow: hidden; border: 1px solid #e1e6ef; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(54,66,98,.07); }
.system-store-table-scroll { min-height: 0; overflow: auto; }
.system-store-table-card table { width: 100%; min-width: 1160px; border-collapse: collapse; }
.system-store-table-card th { height: 46px; padding: 0 14px; background: #f4f6fa; color: #6d788e; font-size: 12px; text-align: left; white-space: nowrap; }
.system-store-table-card td { height: 68px; padding: 10px 14px; border-top: 1px solid #edf0f4; color: #4d5970; font-size: 13px; vertical-align: middle; }
.system-store-table-card td strong,
.system-store-table-card td small { display: block; }
.system-store-table-card td strong { max-width: 220px; overflow: hidden; color: #253149; text-overflow: ellipsis; white-space: nowrap; }
.system-store-table-card td small { margin-top: 4px; color: #929bad; }
.system-store-table-card footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid #edf0f4; padding: 0 18px; }
.system-store-table-card footer > span { margin-right: auto; color: #758097; }
.system-store-table-card footer select,
.system-store-table-card footer button,
.system-store-table-card footer b { display: grid; height: 34px; min-width: 34px; place-items: center; border: 1px solid #dde3ec; border-radius: 7px; background: #fff; color: #596478; }
.system-store-table-card footer select { display: block; padding: 0 8px; }
.system-store-table-card footer b { border-color: #397cf0; background: #397cf0; color: #fff; }
.managed-store-status { display: inline-flex; min-height: 26px; align-items: center; border-radius: 16px; padding: 0 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.managed-store-status.connected { background: #ddf7ed; color: #087e5d; }
.managed-store-status.disconnected { background: #fff0d8; color: #a86908; }
.managed-store-delete { border: 1px solid #ffcbd0; border-radius: 7px; padding: 6px 10px; background: #fff5f6; color: #d53b4b; font-weight: 700; cursor: pointer; }
.managed-store-locked { color: #9aa3b3; font-size: 12px; white-space: nowrap; }
.system-store-empty { display: grid; min-height: 260px; place-content: center; gap: 7px; color: #929bad; text-align: center; }
.system-store-empty strong { color: #596478; font-size: 16px; }
.system-store-empty.error strong { color: #c43f50; }
.managed-store-delete-dialog { border: 0; padding: 0; background: transparent; }
.managed-store-delete-dialog::backdrop { background: rgba(20,29,48,.52); backdrop-filter: blur(5px); }
.managed-store-delete-dialog form { display: grid; width: min(520px,calc(100vw - 28px)); grid-template-columns: 48px minmax(0,1fr); gap: 16px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; padding: 24px; background: #fff; box-shadow: 0 28px 90px rgba(18,26,44,.35); }
.managed-store-delete-dialog form > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #fff0f1; color: #d63848; font-size: 22px; font-weight: 900; }
.managed-store-delete-dialog small { color: #d63848; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.managed-store-delete-dialog h2 { margin: 5px 0 8px; color: #202b3d; }
.managed-store-delete-dialog p { margin: 0; color: #778297; line-height: 1.65; }
.managed-store-delete-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.managed-store-delete-dialog button { border: 1px solid #dfe4ec; border-radius: 9px; padding: 10px 17px; background: #fff; color: #526078; font-weight: 700; cursor: pointer; }
#agentManagedStoreDeleteConfirm { border-color: #d83b4c; background: #d83b4c; color: #fff; }

@media (max-width: 1280px) {
  .system-store-toolbar { grid-template-columns: minmax(220px,1fr) 170px 140px repeat(3,auto); }
  .system-store-toolbar button { padding-inline: 10px; }
}

@media (max-width: 1100px) {
  .agent-system-stores-page { width: calc(100vw - var(--sidebar-width) - 8px); min-width: 0; padding: 10px; }
  .system-store-toolbar { grid-template-columns: minmax(210px,1fr) minmax(140px,.6fr) minmax(130px,.5fr); }
  .system-store-toolbar button { width: max-content; }
  .system-store-hero { min-height: 160px; padding: 24px; }
}
