:root {
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-synthesis: none;
  color: #17213b;
  background: #f5f7fb;
  --navy: #15223c;
  --navy-light: #24324d;
  --ink: #15213a;
  --muted: #758199;
  --line: #e7ebf3;
  --surface: #fff;
  --accent: #3267df;
  --accent-weak: #edf3ff;
  --success: #178368;
  --danger: #c34251;
  --shadow: 0 16px 45px rgba(20, 37, 73, .055);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { opacity: .58; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(50,103,223,.45); outline-offset: 3px;
}
.hidden { display: none !important; }
.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; }
.dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #36b38d; box-shadow: 0 0 0 3px rgba(54,179,141,.12); flex-shrink: 0; }
.muted { color: var(--muted); }
.eyebrow { font-size: .74rem; letter-spacing: .19em; font-weight: 800; color: #7890c5; }
.brand-symbol { display: inline-flex; align-items: center; justify-content: center; width: 37px; height: 37px; flex-shrink: 0; border-radius: 12px; font-size: 1.6rem; font-weight: 850; line-height: 1; color: #fff; background: linear-gradient(145deg,#6b92f6,#2864d5); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 8px 20px rgba(50,103,223,.25); letter-spacing: -.12em; padding-right: 4px; }
.primary-button, .outline-button, .ghost-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-weight: 650; transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.primary-button { background: #3169e3; color: #fff; border: 1px solid #3169e3; padding: 12px 18px; box-shadow: 0 6px 12px rgba(49,105,227,.15); }
.primary-button:hover { background: #285bd0; box-shadow: 0 7px 14px rgba(49,105,227,.22); }
.outline-button { background: white; border: 1px solid #dce3ee; padding: 10px 14px; color: #475673; }
.outline-button:hover, .ghost-button:hover { background: #f2f5fb; }
.ghost-button { background: transparent; border: 1px solid #e0e5ef; color: #425273; padding: 11px 15px; }
.icon-button { background: #fff; border: 1px solid var(--line); width: 38px; height: 38px; color: #465777; font-size: 1.1rem; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.boot-logo { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: #fff; font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, #173b84, #6694f8); }
.signin-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(350px,1fr); background: #f8faff; }
.signin-left { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(25px,5vw,64px); background: radial-gradient(ellipse at 86% 20%,rgba(100,142,230,.27),transparent 37%), linear-gradient(135deg,#14213c 15%,#223b70); color:#fff; }
.signin-brand { display: flex; align-items: center; gap: 13px; font-weight: 800; font-size: 1.16rem; letter-spacing: .06em; }
.signin-content { margin-block: 35px; max-width: 630px; }
.signin-content h1 { font-size: clamp(2.45rem,4.6vw,4.7rem); line-height:1.25; letter-spacing:-.065em; margin: 22px 0; font-weight: 800; }
.signin-content h1 span { color: #a7c3ff; }
.signin-content > p:not(.eyebrow) { line-height:1.9; color:#c1cce4; max-width: 440px; font-size: 1.03rem; }
.signin-chips { display:flex; flex-wrap:wrap; gap: 9px; margin-top:36px; }
.signin-chips span { padding:9px 13px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.05); border-radius:40px; color:#d9e2f4; font-size:.81rem; }
.signin-foot { color:#8499bc; font-size:.78rem; }
.signin-right { display:flex; flex-direction:column; justify-content:center; align-items:center; padding:32px; gap:30px; }
.signin-card { width:100%; max-width:410px; padding:40px; background:#fff; border-radius:24px; border:1px solid #ebedf5; box-shadow:0 30px 80px rgba(30,57,110,.09); }
.icon-panel { display:grid; place-items:center; width:52px; height:52px; border-radius:15px; background:#ebf1ff; color:#3169e3; font-size:1.6rem; margin-bottom:32px; }
.signin-card .eyebrow { font-size:.71rem; color:#6380c3; }
.signin-card h2 { font-size:1.8rem; letter-spacing:-.05em; margin: 12px 0; }
.signin-card .muted { font-size:.91rem; line-height:1.75; }
.signin-cta { display:flex; margin-top:28px; justify-content:space-between; padding:15px 18px; }
.signin-note { display:flex; align-items:center; gap:10px; color:#7b879d; font-size:.74rem; margin-top:22px; }
.signin-disclaimer { text-align:center; max-width:380px; color:#8794a8; font-size:.81rem; line-height:1.6; }
.workspace { min-height:100vh; display:flex; }
.sidebar { position:sticky; top:0; height:100vh; width:246px; flex:0 0 246px; display:flex; flex-direction:column; background:var(--navy); color:#cbd5e6; padding:27px 15px 20px; z-index:30; }
.brand { display:flex; gap:12px; align-items:center; margin:0 12px 42px; color:#fff; white-space:nowrap; }
.brand-text { font-size:1.05rem; font-weight:800; letter-spacing:.085em; }
.brand-text small { display:block; margin-top:5px; font-size:.56rem; letter-spacing:.18em; font-weight:700; color:#788eae; }
.sidebar-section-label { font-size:.65rem; letter-spacing:.18em; font-weight:800; color:#60718f; padding:0 17px; margin-bottom:15px; }
.navigation { display:flex; flex-direction:column; gap:5px; }
.nav-link { border:0; background:transparent; display:flex; align-items:center; gap:14px; width:100%; color:#a9b7d0; text-align:left; padding:13px 16px; border-radius:10px; font-size:.88rem; font-weight:560; }
.nav-link:hover { background:rgba(255,255,255,.06); color:#fff; }
.nav-link.active { background:#293e69; color:#fff; box-shadow:inset 3px 0 0 #78a5ff; font-weight:740; }
.nav-symbol { width:20px; height:20px; display:grid; place-items:center; font-size:1.25rem; font-weight:400; color:#91a6c7; }
.nav-link.active .nav-symbol { color:#b6ceff; }
.sidebar-bottom { margin-top:auto; }
.system-note { display:flex; align-items:center; gap:11px; background:rgba(255,255,255,.055); border:1px solid rgba(255,255,255,.07); padding:16px 12px; border-radius:13px; margin:0 5px 20px; }
.system-note-icon { display:grid; place-items:center; height:38px; width:38px; color:#b7cdff; background:#32466b; border-radius:10px; }
.system-note strong { font-size:.81rem; display:block; color:#e4eaf6; }
.system-note small { font-size:.67rem; display:block; margin-top:5px; color:#8597b5; }
.sidebar-version { display:flex; align-items:center; gap:9px; color:#8091ac; font-size:.73rem; margin-left:17px; }
.workspace-main { flex:1; min-width:0; }
.topbar { height:80px; display:flex; align-items:center; justify-content:space-between; padding:0 clamp(20px,3.1vw,48px); background:#fff; border-bottom:1px solid #e9edf4; gap:15px; }
.topbar-leading, .topbar-actions { display:flex; align-items:center; gap:19px; min-width:0; }
.breadcrumb { white-space:nowrap; color:#93a0b4; font-size:.82rem; }
.breadcrumb span { padding:0 8px; color:#bdc6d5; }
.breadcrumb strong { color:#293852; }
.dev-indicator { display:flex; align-items:center; gap:9px; color:#6c7b97; font-size:.73rem; font-weight:700; }
.role-indicator { border:1px solid #e3e9f4; background:#f5f8fd; color:#546b98; border-radius:8px; font-size:.71rem; font-weight:700; padding:7px 9px; white-space:nowrap; }
.sku-list { display:grid; gap:9px; margin-top:12px; }
.history-heading { font-size:1rem; letter-spacing:-.025em; margin:24px 0 12px; }
.history-hint { color:#8393aa; font-size:.76rem; margin:0 0 12px; }
.receipt-history { padding-top:10px; }
.receipt-history .table-scroll { border:1px solid #e7ecf3; border-radius:10px; }
.receipt-history .data-table th, .receipt-history .data-table td { padding:10px 12px; }
.sku-row { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:13px; border:1px solid #e7ecf3; border-radius:10px; }
.sku-row strong { display:block; font-size:.84rem; color:#263857; }
.sku-row small { display:block; margin-top:5px; color:#8b98ac; font-size:.76rem; }
.org-select-label select { border:1px solid #e3e8f1; background:#f9faff; color:#2a3852; border-radius:10px; max-width:220px; padding:10px 32px 10px 13px; font-size:.82rem; font-weight:700; }
.menu-toggle { display:none; }
.main-content { max-width:1500px; margin:auto; padding:42px clamp(20px,3.1vw,48px) 22px; }
.intro { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:27px; }
.intro-kicker { display:flex; gap:10px; align-items:center; color:#8799b5; font-size:.67rem; font-weight:800; letter-spacing:.2em; }
.kicker-line { display:inline-block; width:18px; height:2px; background:#638bdf; }
.intro h1 { font-size:clamp(1.75rem,2.1vw,2.15rem); letter-spacing:-.07em; margin:11px 0 8px; font-weight:800; }
.page-description { color:#8592a6; font-size:.9rem; line-height:1.6; margin:0; }
.page-actions { display:flex; gap:9px; flex-wrap:wrap; align-items:center; }
.message-banner { padding:15px 18px; background:#fff5f4; color:#9d3640; border:1px solid #f2d5d6; border-radius:12px; margin:0 0 18px; line-height:1.6; font-size:.86rem; }
.section-kicker { font-size:.75rem; color:#8b99b0; font-weight:750; letter-spacing:.07em; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.stat-card { min-height:157px; background:#fff; border:1px solid var(--line); border-radius:17px; padding:21px; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.stat-card::after { content:""; position:absolute; width:80px; height:80px; right:-32px; top:-38px; background:#edf3ff; border-radius:50%; }
.stat-label { font-size:.82rem; color:#7b89a2; font-weight:650; }
.stat-number { font-size:clamp(1.6rem,2.4vw,2.25rem); letter-spacing:-.05em; font-weight:800; color:#1e2a47; margin:19px 0 7px; font-variant-numeric:tabular-nums; }
.stat-foot { color:#a0abc0; font-size:.71rem; }
.stat-card.accent { background:linear-gradient(135deg,#254d9c,#356ad8); border-color:#315bb7; }
.stat-card.accent::after { background:rgba(255,255,255,.07); }
.stat-card.accent .stat-label,.stat-card.accent .stat-foot { color:#cbd9fa; }
.stat-card.accent .stat-number { color:white; }
.overview-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(275px,1fr); gap:18px; margin-top:22px; }
.surface-panel { background:#fff; border:1px solid var(--line); border-radius:17px; box-shadow:var(--shadow); overflow:hidden; }
.panel-header { display:flex; align-items:center; justify-content:space-between; padding:21px 23px; border-bottom:1px solid #eff1f6; gap:10px; }
.panel-header h2 { font-size:1.01rem; letter-spacing:-.035em; margin:0; }
.panel-header .muted { font-size:.77rem; }
.panel-body { padding:22px; }
.table-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 23px; border-bottom:1px solid #eef0f5; flex-wrap:wrap; }
.table-toolbar .muted { font-size:.77rem; }
.search-box { border:1px solid #e3e8f1; border-radius:10px; background:#fafbfe; color:#24314e; padding:10px 13px; font-size:.82rem; min-width:220px; max-width:340px; width:100%; }
.table-scroll { overflow-x:auto; width:100%; }
.data-table { border-collapse:collapse; width:100%; text-align:left; white-space:nowrap; }
.data-table th { background:#fbfcff; color:#7b879c; font-size:.74rem; font-weight:750; padding:15px 22px; border-bottom:1px solid #edf0f5; }
.data-table td { font-size:.84rem; padding:16px 22px; border-bottom:1px solid #f0f2f6; color:#30405c; }
.data-table tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover { background:#fafcff; }
.data-table .main-cell { color:#1d2c48; font-weight:700; }
.data-table .mono { font-variant-numeric:tabular-nums; font-feature-settings:"tnum"; }
.status-tag { display:inline-flex; align-items:center; background:#f0f3f9; color:#69778e; padding:6px 9px; border-radius:7px; font-size:.72rem; font-weight:750; }
.status-tag.success { background:#e8f7f2; color:#187860; }
.status-tag.warning { background:#fff4e3; color:#9a641a; }
.status-tag.info { background:#ebf1ff; color:#3163bc; }
.link-button { color:#3065d7; border:0; background:transparent; padding:3px 0; font-weight:750; text-align:left; }
.link-button:hover { text-decoration:underline; }
.empty-state { display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:48px 24px 56px; }
.empty-illustration { width:68px; height:68px; display:grid; place-items:center; border-radius:20px; background:#f0f4fb; color:#7191c8; font-size:1.7rem; margin-bottom:16px; }
.empty-state h3 { font-size:.95rem; margin:0 0 9px; }
.empty-state p { margin:0; max-width:340px; color:#919caf; font-size:.82rem; line-height:1.75; }
.quick-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quick-link { display:flex; flex-direction:column; gap:12px; border:1px solid #e9edf5; background:#fafbfe; border-radius:12px; text-align:left; padding:17px; color:#253656; font-size:.81rem; font-weight:730; min-height:100px; }
.quick-link:hover { border-color:#baccf8; background:#f4f7ff; }
.quick-icon { color:#446fd2; font-size:1.3rem; }
.help-card { margin-top:18px; padding:17px 19px; border-radius:13px; background:#f5f8fe; border:1px solid #e6edfa; color:#6b7e9b; font-size:.79rem; line-height:1.7; }
.help-card strong { display:block; color:#34496b; margin-bottom:5px; }
.workspace-footer { color:#9cabc2; margin-top:40px; font-size:.72rem; }
.workspace-footer span { margin:0 8px; }
.loading-state { color:#7888a1; padding:45px 22px; text-align:center; font-size:.88rem; }
.modal-backdrop { position:fixed; inset:0; background:rgba(17,29,50,.52); backdrop-filter:blur(4px); display:grid; place-items:center; padding:20px; z-index:100; overflow-y:auto; }
.modal { width:100%; max-width:530px; background:#fff; border-radius:20px; box-shadow:0 35px 100px rgba(12,24,50,.22); padding:30px; max-height:calc(100vh - 40px); overflow-y:auto; }
.modal-header { display:flex; align-items:start; justify-content:space-between; margin-bottom:24px; }
.modal-header h2 { font-size:1.35rem; margin:0 0 7px; letter-spacing:-.045em; }
.modal-header p { margin:0; color:var(--muted); font-size:.81rem; line-height:1.6; }
.close-button { border:0; background:#f2f4fa; color:#74839d; width:34px; height:34px; border-radius:10px; font-size:1.2rem; }
.form-grid { display:grid; gap:16px; }
.form-field { display:flex; flex-direction:column; gap:8px; font-size:.83rem; color:#3d4a62; font-weight:650; }
.form-field input,.form-field select { width:100%; padding:12px 13px; border:1px solid #dce3ef; border-radius:10px; outline:0; color:#283752; background:#fff; }
.form-field input:focus,.form-field select:focus { border-color:#6c94eb; box-shadow:0 0 0 3px rgba(100,148,235,.13); }
.form-hint { color:#91a0b4; font-size:.73rem; font-weight:430; line-height:1.6; }
.form-error { background:#fff1f1; border:1px solid #f3d6d9; border-radius:10px; padding:11px; color:#a4404d; font-size:.83rem; }
.modal-actions { display:flex; align-items:center; justify-content:flex-end; gap:9px; margin-top:25px; }
.line-list { display:grid; gap:12px; }
.order-line-row { display:grid; grid-template-columns:minmax(0,1fr) 86px 36px; gap:8px; align-items:end; }
.order-line-row button { border:1px solid #e1e6f0; background:#f6f7fb; color:#8592a7; border-radius:9px; height:43px; }
.divider-line { border:0; border-top:1px solid #eef0f5; margin:8px 0; }
.toast { position:fixed; bottom:23px; right:23px; z-index:120; background:#1e345a; color:#fff; padding:14px 19px; box-shadow:0 13px 40px rgba(22,42,76,.25); border-radius:12px; max-width: min(92vw,420px); font-size:.85rem; }
.mobile-overlay { position:fixed; inset:0; background:rgba(16,27,49,.45); z-index:25; }
@media(max-width:1190px) {
 .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .overview-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:900px) {
 .sidebar { position:fixed; transform:translateX(-100%); transition:transform .2s ease; box-shadow:14px 0 40px rgba(14,26,47,.2); }
 .sidebar.open { transform:translateX(0); }
 .menu-toggle { display:inline-flex; }
 .topbar { height:69px; }
 .main-content { padding-top:30px; }
}
@media(max-width:680px) {
 .signin-screen { grid-template-columns:1fr; }
 .signin-left { min-height:360px; padding:28px; }
 .signin-content { margin-block:40px 15px; }
 .signin-content h1 { font-size:2.25rem; }
 .signin-foot { display:none; }
 .signin-right { padding:28px 20px 50px; }
 .signin-card { padding:27px; }
 .topbar { padding:0 15px; }
 .topbar-actions { gap:8px; }
 .dev-indicator { display:none; }
 .role-indicator { display:none; }
 .org-select-label select { width:120px; font-size:.75rem; padding:9px 5px; }
 .topbar .outline-button { font-size:.73rem; padding:9px; }
 .breadcrumb { font-size:.74rem; }
 .main-content { padding:27px 16px; }
 .intro { align-items:start; flex-direction:column; }
 .page-actions { width:100%; }
 .page-actions button { flex:1; }
 .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .stat-card { padding:17px; min-height:135px; }
 .stat-number { font-size:1.7rem; }
 .stat-foot { font-size:.65rem; }
 .table-toolbar { padding:14px; }
 .search-box { max-width:none; min-width:0; }
 .panel-header { padding:17px; }
 .modal { padding:22px; }
 .quick-links { gap:8px; }
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; }
}

.order-detail-item { border:1px solid #e7ecf3; border-radius:12px; padding:14px; }
.order-detail-item-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:11px; }
.order-detail-item-header strong { display:block; font-size:.86rem; }
.order-detail-item-header small { display:block; color:#8291a7; margin-top:5px; font-size:.76rem; }
.order-review-facts { display:grid; grid-template-columns:1fr 1fr; gap:14px 24px; margin:0; padding:18px; background:#f7faff; border-radius:12px; }
.order-review-facts dt { color:var(--muted); font-size:.77rem; margin-bottom:6px; }
.order-review-facts dd { margin:0; font-weight:700; overflow-wrap:anywhere; }
.order-review-panel,.order-review-panel section { min-width:0; }
.order-review-panel p,.order-review-panel strong,.order-review-panel small { overflow-wrap:anywhere; }
.order-review-panel h3 { font-size:1rem; margin:12px 0; }
.order-review-panel .help-card { margin-top:10px; }
@media(max-width:680px) {
 .order-review-facts { grid-template-columns:1fr; padding:14px; }
 .order-detail-item-header { align-items:stretch; flex-direction:column; }
 .order-review-panel .allocation-card button { flex:1 1 140px; }
 .order-review-panel .order-detail-item>button { max-width:100%; }
}
.allocation-card { border-top:1px solid #edf1f6; padding:13px 0 4px; display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.allocation-card strong { display:block; font-size:.8rem; }
.allocation-card small,.allocation-note { display:block; font-size:.71rem; color:#8494ad; margin-top:4px; }
.allocation-card .primary-button,.allocation-card .outline-button { padding:9px 11px; font-size:.75rem; }

/* Channel catalog steps are local-only, permission-aware and mobile scroll-safe. */
.channel-workspace { display:grid; gap:18px; min-width:0; }
.channel-workspace .help-card { margin-top:0; }
.channel-modal-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin:15px 0; }
.channel-modal-tools .muted { font-size:.76rem; margin:0; line-height:1.5; }
.channel-modal-tools button { flex-shrink:0; padding:9px 12px; font-size:.76rem; }
.modal:has(.channel-modal-tools) { max-width:min(92vw,780px); }
.modal .surface-panel { margin-top:12px; }
.modal .table-scroll { overflow-x:auto; }
.modal .data-table { min-width:480px; }
@media(max-width:680px) {
  .channel-modal-tools { align-items:stretch; flex-direction:column; }
  .channel-modal-tools button { width:100%; }
  .modal:has(.channel-modal-tools) { max-width:100%; }
}

/* Bounded, wide import workflow; table scrolling stays inside the dialog. */
.import-modal { max-width:min(1100px,96vw); }
.import-modal .modal-header { position:sticky; top:-1px; z-index:1; background:#fff; padding:8px 0 12px; border-bottom:1px solid #e6edfa; }
.import-modal h3 { scroll-margin-top:100px; }
.import-modal > div { min-width:0; }
.import-configuration { border:0; padding:0; margin:24px 0 16px; min-width:0; }
.import-configuration legend { font-weight:750; margin-bottom:16px; }
.import-config-grid,.import-mapping { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.import-mapping { margin-top:16px; }
.import-status { color:#34496b; font-size:.85rem; line-height:1.6; }
.import-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.import-summary > div { padding:13px; border:1px solid #e6edfa; border-radius:10px; background:#f5f8fe; }
.import-summary dt { color:var(--muted); font-size:.78rem; }
.import-summary dd { margin:8px 0 0; font-weight:750; font-size:1.15rem; }
.import-results .data-table { min-width:640px; }
.import-results caption { text-align:left; font-size:.95rem; font-weight:750; padding:14px 0; }
.import-results td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.import-identifier { min-width:140px; max-width:240px; }
.import-item-list { display:grid; gap:12px; padding-left:16px; min-width:230px; }
.import-item-list li > * { display:block; overflow-wrap:anywhere; }
.import-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin:12px 0 20px; font-size:.78rem; }
.import-modal summary { cursor:pointer; color:#3065d7; }
.import-modal :focus-visible { outline:3px solid #3065d7; outline-offset:3px; }
.import-modal .modal-actions { flex-wrap:wrap; }
@media(max-width:680px) {
  .import-modal { padding:20px 14px; max-width:100%; }
  .import-config-grid,.import-mapping { grid-template-columns:minmax(0,1fr); }
  .import-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .import-modal .modal-actions button { flex:1 1 150px; }
}

/* Shared operations detail layout: names wrap, technical identifiers are secondary. */
.technical-details {font-size:.78rem;color:var(--muted);margin-top:.5rem;overflow-wrap:anywhere;}
.technical-details summary {cursor:pointer;}
.modal .help-card,.modal-header,.data-table td {overflow-wrap:anywhere;}
.modal .form-grid {min-width:0;}
.purchase-line {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:start;}
.purchase-line>strong,.purchase-line>details,.purchase-line>span {grid-column:1;}
.purchase-line>button {grid-column:2;grid-row:1 / span 3;}
@media(max-width:600px){.purchase-line {grid-template-columns:minmax(0,1fr);}.purchase-line>button {grid-column:1;grid-row:auto;width:100%;}.modal-actions {flex-wrap:wrap;}.channel-modal-tools {flex-wrap:wrap;}}

.order-sku-review-tools {display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;}
.order-sku-review-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem;}
.order-sku-review-grid h4 {margin:0;font-size:.9rem;}
.order-sku-comparison {font-size:.82rem;line-height:1.65;color:var(--muted);overflow-wrap:anywhere;}
@media(max-width:600px){.order-sku-review-grid {grid-template-columns:minmax(0,1fr);}.order-sku-review-tools button {width:100%;}}

.stock-impact-review {border-top:1px solid #e5e9f0;margin-top:1rem;padding-top:1rem;min-width:0;}
.stock-impact-review h4 {margin:0 0 .5rem;font-size:.95rem;}
.stock-impact-quantities {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:.75rem 0;}
.stock-impact-quantities>div {padding:.5rem .75rem;background:var(--bg);border-radius:6px;overflow-wrap:anywhere;}
.stock-impact-quantities dt {font-size:.78rem;color:var(--muted);}.stock-impact-quantities dd {margin:.25rem 0 0;font-weight:600;}
@media(max-width:600px){.stock-impact-quantities {grid-template-columns:minmax(0,1fr);}}

.return-inspection-panel{display:grid;gap:12px;border-top:1px solid var(--border,#e3e8ef);padding-top:20px;min-width:0}
.return-inspection-panel .allocation-card{overflow-wrap:anywhere;min-width:0}
.return-inspection-form input[type=checkbox]{width:22px;min-height:22px;align-self:start}

/* Sales environment onboarding: usable on narrow and large workspaces. */
.sales-environment-workspace { display:grid; gap:16px; max-width: 920px; }
.sales-provider-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:12px; }
.sales-provider-group { min-width:0; border:1px solid var(--line); border-radius:13px; padding:14px; display:grid; gap:10px; }
.sales-provider-group legend { font-weight:700; padding:0 7px; }
.sales-choice { display:flex; align-items:center; gap:10px; min-height:38px; font-size:.92rem; }
.sales-choice input[type=checkbox] { width:18px; height:18px; flex-shrink:0; }
.sales-outlet-list { display:grid; gap:12px; }
.sales-outlet-row { display:grid; grid-template-columns:minmax(120px,1fr) minmax(165px,2fr) auto auto; gap:12px; align-items:end; padding:14px; border:1px solid var(--line); border-radius:12px; background:white; }
.sales-outlet-row label:not(.sales-choice) { display:grid; gap:5px; font-size:.83rem; min-width:0; }
.sales-outlet-row input[type=text], .sales-outlet-row select { width:100%; min-width:0; padding:9px; border:1px solid #dce3ee; border-radius:8px; }
.sales-outlet-row .form-hint { grid-column:1/-1; margin:0; }
@media(max-width:650px){.sales-outlet-row{grid-template-columns:1fr 1fr}.sales-outlet-row label:nth-child(-n+2){grid-column:1/-1}}

/* Local storefront intake supports narrow mobile screens and semantic labels. */
.local-order-intake { display:grid;gap:16px;padding:16px;max-width:960px }
.local-order-form,.local-order-import { display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:12px;min-width:0 }
.local-order-field { display:grid;gap:5px;min-width:0 }
.local-order-field input,.local-order-field select { width:100%;min-width:0;padding:10px;border:1px solid #dce3ee;border-radius:8px }
.local-order-lines {display:grid;gap:12px}
.local-order-line {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid var(--line);border-radius:10px}
.local-order-list {display:grid;gap:10px;list-style:disc;padding-left:24px;overflow-wrap:anywhere}
.local-order-results,.local-order-file-result,.local-order-history{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.local-order-intake{padding:10px}.local-order-line{grid-template-columns:1fr}}

/* Private evidence stays as structured non-PII references; never as arbitrary HTML. */
.local-review-workspace{display:grid;gap:8px;padding-top:8px}
.local-review-panel{display:grid;gap:10px;min-width:0}
.local-review-form,.local-review-evidence{display:grid;gap:10px;min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px}
.local-review-field{display:grid;gap:5px;min-width:0}
.local-review-field input,.local-review-field select{width:100%;max-width:100%;min-width:0;padding:9px;border:1px solid #dce3ee;border-radius:8px}
.local-review-reason{min-width:0}
@media(max-width:480px){.local-review-form,.local-review-evidence{padding:9px}}

.local-plan-workspace,.local-plan-form,.local-plan-content{display:grid;gap:10px;min-width:0;overflow-wrap:anywhere}
.local-plan-workspace{padding:12px;border:1px solid var(--line);border-radius:10px}
@media(max-width:480px){.local-plan-workspace{padding:9px}}

.local-stock-workspace {margin-top:1rem;}
.local-stock-card,.local-stock-form {min-width:0;overflow-wrap:anywhere;}
.local-stock-form {display:grid;gap:.75rem;margin:.75rem 0;}
.local-stock-form input:not([type="checkbox"]),.local-stock-form select {width:100%;min-width:0;box-sizing:border-box;}

/* Local return quantities use SKU units and remain distinct from financial claims. */
.local-return-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.local-return-form > h5,.local-return-form > p,.local-return-form > button { grid-column:1/-1; }
.local-return-form input,.local-return-form select { min-width:0; width:100%; }
.local-return-workspace { min-width:0; overflow-wrap:anywhere; }
@media(max-width:640px) { .local-return-form { grid-template-columns:minmax(0,1fr); } }
.local-return-form input[type="checkbox"] { width:auto; margin:0; padding:0; justify-self:start; }

/* Account administration shares the established responsive panels and dialogs. */
.account-workspace,.account-grid {display:grid;gap:16px;min-width:0}
.account-card {padding:18px;border:1px solid var(--border,#dfe4ed);border-radius:12px;min-width:0;overflow-wrap:anywhere;background:var(--surface,#fff)}
.account-card h3,.account-card p {overflow-wrap:anywhere}
.account-actions {display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.account-actions>[hidden] {display:none}
.account-form {display:grid;gap:16px}
@media(min-width:900px){.account-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.account-actions>button {width:100%}.account-card {padding:14px}}
.account-workspace .panel-header {align-items:flex-start;flex-wrap:wrap;gap:8px}
.account-workspace .panel-header h2 {flex-shrink:0}

/* Real document printing is isolated from the Windows synthetic proof panel. */
@page trade-document{size:A4;margin:16mm}
#trade-document-print-root{display:none}
@media print{
  body.trade-document-print-mode > *{display:none!important}
  body.trade-document-print-mode > #desktop-proof{display:none!important}
  body.trade-document-print-mode > #trade-document-print-root{display:block!important;page:trade-document;max-width:none;margin:0;color:#172332;font:14px/1.6 'Malgun Gothic','Noto Sans CJK KR',sans-serif}
  #trade-document-print-root h1{font-size:25px;border-bottom:3px solid #243d5b;padding-bottom:12px}
  #trade-document-print-root p,#trade-document-print-root td,#trade-document-print-root th{overflow-wrap:anywhere;word-break:normal;white-space:normal}
  #trade-document-print-root table{border-collapse:collapse;width:100%;table-layout:fixed;page-break-inside:avoid;margin:16px 0;font-size:12px;line-height:1.5}
  #trade-document-print-root th,#trade-document-print-root td{border:1px solid #a8b5c4;padding:8px;text-align:left;vertical-align:top}
  #trade-document-print-root thead{display:table-header-group}
  #trade-document-print-root tr{break-inside:avoid}
  #trade-document-print-root .items-context{font-size:12px}
  #trade-document-print-root .items-new-page{page-break-before:always;break-before:page}
  #trade-document-print-root .product-column{width:75mm}
  #trade-document-print-root .quantity-column{width:24mm;white-space:nowrap}
  #trade-document-print-root .price-column{width:35mm}
  #trade-document-print-root .number-column{white-space:nowrap}
  #trade-document-print-root .foot{border-top:1px solid #a8b5c4;padding-top:12px;font-size:12px}
}

/* Public recovery keeps account details out of shared workspace/session state. */
.recovery-page { min-height:100vh; display:grid; place-items:center; padding:32px 20px; background:#f8faff; }
.recovery-card { max-width:460px; min-width:0; }
.recovery-card .signin-brand { font-size:1rem; gap:10px; margin-bottom:30px; }
.recovery-card h1 { font-size:1.8rem; letter-spacing:-.05em; }
.recovery-card .form-field { display:grid; gap:8px; margin-top:24px; }
.recovery-card .signin-cta { width:100%; justify-content:center; }
.recovery-status { min-height:3.5em; overflow-wrap:anywhere; }
.recovery-back { display:inline-block; margin-top:18px; color:#345db0; text-decoration:underline; text-underline-offset:3px; }
