.wa-main { min-width: 0; padding: 30px 32px 72px; }
.wa-position-fields { display:grid;grid-template-columns:1fr 2fr;gap:20px;padding:20px;margin-bottom:18px; }
.wa-position-fields p[role="alert"] { grid-column:1/-1;color:var(--bo-red-600);margin:0; }
.wa-text-action { display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:4px 7px;border:0;border-radius:6px;background:transparent;color:var(--bo-teal-700);font:inherit;white-space:nowrap;cursor:pointer; }
.wa-text-action:hover { background:#e9f6f7; }
.wa-text-action.danger { color:var(--bo-red-600); }
.wa-text-action:focus-visible { outline:2px solid var(--bo-teal-700);outline-offset:2px; }
.wa-pages { align-items:center; }
.wa-pages button:disabled { opacity:.4;cursor:not-allowed; }
.wa-main .wa-table { min-width:960px; }
@media(max-width:800px) { .wa-position-fields { grid-template-columns:1fr; } }
.wa-main svg { width: 16px; height: 16px; }
.wa-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.wa-page-copy { max-width: 680px; }
.wa-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--bo-teal-700); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.wa-kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.wa-page-copy h1 { margin: 0; color: var(--bo-navy-900); font-size: 27px; letter-spacing: -.025em; }
.wa-page-copy p { margin: 9px 0 0; color: var(--bo-muted); font-size: 13px; line-height: 1.65; }
.wa-head-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.wa-head-actions .btn i { width: 17px; height: 17px; }

.wa-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--bo-border); border-radius: 13px; background: var(--bo-white); }
.wa-stat { position: relative; min-height: 92px; padding: 20px 22px; }
.wa-stat + .wa-stat { border-left: 1px solid var(--bo-border); }
.wa-stat span { display: block; margin-bottom: 7px; color: var(--bo-muted); font-size: 11px; }
.wa-stat strong { color: var(--bo-navy-900); font-size: 25px; font-variant-numeric: tabular-nums; }
.wa-stat small { margin-left: 5px; color: var(--bo-muted); font-size: 10px; }
.wa-stat:first-child::after { content: ""; position: absolute; left: 22px; bottom: -1px; width: 38px; height: 2px; background: var(--bo-teal-700); }

.wa-panel { overflow: hidden; border: 1px solid var(--bo-border); border-radius: 13px; background: var(--bo-white); }
.wa-toolbar { display: flex; align-items: center; gap: 9px; min-height: 68px; padding: 13px 14px; border-bottom: 1px solid var(--bo-border); }
.wa-search { position: relative; flex: 1 1 280px; max-width: 360px; }
.wa-search > i, .wa-search > svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; color: #8491a1; transform: translateY(-50%); pointer-events: none; }
.wa-search input { width: 100%; height: 40px; padding: 0 13px 0 38px; border: 1px solid var(--bo-border-strong); border-radius: 9px; color: var(--bo-ink); background: #fff; font-size: 12px; }
.wa-filter { height: 40px; min-width: 124px; padding: 0 30px 0 11px; border: 1px solid var(--bo-border-strong); border-radius: 9px; color: #536176; background: #fff; font-size: 12px; }
.wa-result-count { margin-left: auto; color: var(--bo-muted); font-size: 11px; white-space: nowrap; }
.wa-table-wrap { overflow-x: auto; }
.wa-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wa-table th { height: 42px; padding: 0 14px; color: #7e8b9b; background: #f8fafc; font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
.wa-table td { height: 68px; padding: 10px 14px; border-top: 1px solid #edf1f5; color: #506075; font-size: 11px; vertical-align: middle; }
.wa-table tbody tr { transition: background .16s ease; }
.wa-table tbody tr:hover { background: #fbfdfe; }
.wa-person { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; }
.wa-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #0a6e7d; background: #e1f3f4; font-size: 10px; font-weight: 700; }
.wa-avatar.system { color: #fff; background: var(--bo-navy-900); }
.wa-stack { display: grid; gap: 3px; min-width: 0; }
.wa-stack strong { overflow: hidden; color: var(--bo-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wa-stack span { overflow: hidden; color: var(--bo-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wa-tag { display: inline-flex; align-items: center; gap: 5px; width: fit-content; min-height: 23px; max-width: 100%; padding: 3px 8px; border: 1px solid var(--bo-border); border-radius: 999px; color: #506075; background: #f8fafc; font-size: 9px; font-weight: 600; white-space: nowrap; }
.wa-tag i, .wa-tag svg { width: 12px; height: 12px; }
.wa-tag.system { color: #fff; border-color: var(--bo-navy-900); background: var(--bo-navy-900); }
.wa-tag.ok { color: #087456; border-color: #bde6d9; background: #ecfbf5; }
.wa-tag.off { color: var(--bo-red-600); border-color: #f2c9ce; background: var(--bo-red-50); }
.wa-tag.blue { color: #315f9e; border-color: #cad9f2; background: #eef4ff; }
.wa-warehouses { display: flex; flex-wrap: wrap; gap: 4px; }
.wa-warehouse { padding: 2px 6px; border-radius: 4px; color: #536176; background: #edf2f5; font-size: 8px; font-weight: 700; }
.wa-more { color: #0a6e7d; background: #e0f2f3; }
.wa-row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.wa-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 8px; color: #718094; background: transparent; cursor: pointer; }
.wa-icon-btn:hover { color: var(--bo-navy-900); border-color: var(--bo-border); background: #fff; }
.wa-icon-btn.danger:hover { color: var(--bo-red-600); border-color: #efcbd0; background: #fff8f9; }
.wa-icon-btn i, .wa-icon-btn svg { width: 16px; height: 16px; }
.wa-pagination { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 14px; border-top: 1px solid var(--bo-border); color: var(--bo-muted); font-size: 10px; }
.wa-pages { display: flex; gap: 5px; }
.wa-pages button { min-width: 31px; height: 31px; border: 1px solid var(--bo-border); border-radius: 7px; background: #fff; color: #536176; font-size: 10px; }
.wa-pages button.active { color: #fff; border-color: var(--bo-navy-900); background: var(--bo-navy-900); }

.wa-position-layout { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(320px, .52fr); gap: 20px; }
.wa-position-head, .wa-position-row { display: grid; grid-template-columns: 1.25fr .7fr 72px 110px 36px; gap: 12px; align-items: center; padding: 0 16px; }
.wa-position-head { min-height: 42px; color: #7e8b9b; background: #f8fafc; font-size: 9px; font-weight: 700; }
.wa-position-row { min-height: 73px; border-top: 1px solid #edf1f5; cursor: pointer; transition: background .16s ease; }
.wa-position-row:hover, .wa-position-row.selected { background: #eff8f9; }
.wa-position-name { display: grid; gap: 4px; }
.wa-position-name strong { color: var(--bo-ink); font-size: 12px; }
.wa-position-name span { overflow: hidden; color: var(--bo-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wa-metric { display: grid; gap: 3px; }
.wa-metric strong { color: var(--bo-navy-900); font-size: 15px; }
.wa-metric span { color: var(--bo-muted); font-size: 8px; }
.wa-position-detail { align-self: start; position: sticky; top: 104px; padding: 22px; overflow: hidden; }
.wa-position-detail::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--bo-teal-500); }
.wa-position-detail-head { display: flex; align-items: center; gap: 12px; }
.wa-position-detail-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; color: var(--bo-teal-700); background: #e9f6f7; border: 1px solid #d4ecee; border-radius: 12px; }
.wa-position-detail-icon svg { width: 20px; height: 20px; }
.wa-position-detail-heading { min-width: 0; }
.wa-position-detail-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--bo-muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.wa-position-type { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; font-size: 8px; letter-spacing: 0; }
.wa-position-type.is-system { color: #7b5a18; background: #fff5d9; }
.wa-position-type.is-custom { color: var(--bo-teal-700); background: #e7f7f7; }
.wa-position-detail h2 { margin: 0; color: var(--bo-navy-900); font-size: 19px; line-height: 1.25; }
.wa-position-detail-description { margin: 14px 0 17px; color: var(--bo-muted); font-size: 11px; line-height: 1.65; }
.wa-overline { color: var(--bo-teal-700); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.wa-position-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 18px; padding: 13px 0; background: #f7fafb; border-block: 1px solid var(--bo-border); }
.wa-position-summary > div { min-width: 0; padding: 0 11px; border-right: 1px solid var(--bo-border); }
.wa-position-summary > div:last-child { border-right: 0; }
.wa-position-summary dt { color: var(--bo-muted); font-size: 8px; white-space: nowrap; }
.wa-position-summary dd { margin: 5px 0 0; color: var(--bo-navy-900); font-size: 18px; font-weight: 800; line-height: 1; }
.wa-position-summary dd small { margin-left: 3px; color: var(--bo-muted); font-size: 8px; font-weight: 700; }
.wa-permission-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.wa-permission-summary-head > div { display: grid; gap: 2px; }
.wa-permission-summary-head span { color: var(--bo-navy-900); font-size: 11px; font-weight: 800; }
.wa-permission-summary-head small { color: var(--bo-muted); font-size: 8px; }
.wa-permission-summary-head > strong { flex: 0 0 auto; color: var(--bo-teal-700); font-size: 9px; }
.wa-permission-summary-list { display: grid; border: 1px solid var(--bo-border); border-radius: 10px; overflow: hidden; }
.wa-permission-summary-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border-bottom: 1px solid var(--bo-border); background: #fff; }
.wa-permission-summary-item:last-of-type { border-bottom: 0; }
.wa-permission-check { width: 20px; height: 20px; display: grid; place-items: center; color: var(--bo-teal-700); background: #eaf6f7; border-radius: 6px; }
.wa-permission-check svg { width: 12px; height: 12px; }
.wa-permission-summary-item > div { min-width: 0; display: grid; gap: 2px; }
.wa-permission-summary-item strong { overflow: hidden; color: var(--bo-navy-900); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wa-permission-summary-item span { color: var(--bo-muted); font-size: 8px; }
.wa-permission-summary-item small { color: var(--bo-muted); font-size: 8px; white-space: nowrap; }
.wa-permission-more { padding: 8px 10px; color: var(--bo-teal-700); background: #f4fbfb; font-size: 8px; font-weight: 800; text-align: center; }
.wa-permission-empty { display: flex; align-items: flex-start; gap: 10px; padding: 13px; color: var(--bo-muted); background: #f7fafb; border: 1px dashed var(--bo-border); border-radius: 10px; }
.wa-permission-empty > span { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; color: var(--bo-muted); }
.wa-permission-empty svg { width: 17px; height: 17px; }
.wa-permission-empty strong { display: block; color: var(--bo-navy-900); font-size: 10px; }
.wa-permission-empty p { margin: 3px 0 0; font-size: 8px; line-height: 1.5; }
.wa-position-update { display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 6px; margin-top: 13px; color: var(--bo-muted); font-size: 8px; }
.wa-position-update svg { width: 13px; height: 13px; }
.wa-position-update strong { justify-self: end; color: var(--bo-navy-900); font-size: 9px; }
.wa-position-action { width: 100%; min-height: 39px; margin-top: 15px; }
.wa-lock-note { display: flex; gap: 8px; margin-top: 16px; padding: 11px; border-radius: 8px; color: #315f9e; background: #eef4ff; font-size: 9px; line-height: 1.6; }
.wa-lock-note i, .wa-lock-note svg { flex: 0 0 auto; width: 15px; height: 15px; }

.wa-permission-shell { position: relative; display: grid; grid-template-columns: 184px 1fr; min-height: calc(100vh - 190px); overflow: hidden; border: 1px solid var(--bo-border); border-radius: 13px; background: #fff; }
.wa-permission-nav { padding: 14px 9px; border-right: 1px solid var(--bo-border); background: #f8fafc; }
.wa-permission-nav > span { display: block; padding: 0 9px 10px; color: #7e8b9b; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.wa-permission-nav button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 39px; padding: 0 9px; border: 0; border-radius: 7px; color: #536176; background: transparent; font-size: 10px; text-align: left; }
.wa-permission-nav button:hover { background: #edf2f5; }
.wa-permission-nav button.active { color: var(--bo-navy-900); background: #fff; box-shadow: 0 0 0 1px var(--bo-border); font-weight: 700; }
.wa-permission-nav button small { color: var(--bo-muted); font-size: 8px; }
.wa-permission-content { min-width: 0; padding-bottom: 72px; }
.wa-permission-top { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 17px; border-bottom: 1px solid var(--bo-border); }
.wa-permission-top h2 { margin: 0 0 3px; font-size: 13px; }
.wa-permission-top p { margin: 0; color: var(--bo-muted); font-size: 9px; }
.wa-permission-tools { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; }
.wa-permission-tools > .btn { flex: 0 0 auto; min-width: 88px; white-space: nowrap; }
.wa-permission-tools .wa-search { flex: 0 0 250px; width: 250px; }
.wa-permission-list { padding: 0 17px; }
.wa-permission-row { display: grid; grid-template-columns: minmax(180px, .78fr) minmax(360px, 1.22fr); gap: 16px; padding: 17px 0; border-bottom: 1px solid #edf1f5; }
.wa-page-check { display: flex; align-items: flex-start; gap: 9px; }
.wa-page-check input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--bo-teal-700); }
.wa-page-check span { display: grid; gap: 3px; }
.wa-page-check strong { font-size: 11px; }
.wa-page-check small { color: var(--bo-muted); font-size: 8px; line-height: 1.5; }
.wa-actions { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
.wa-action-check { position: relative; }
.wa-action-check input { position: absolute; opacity: 0; }
.wa-action-check span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border: 1px solid var(--bo-border); border-radius: 6px; color: #657387; background: #fff; cursor: pointer; font-size: 9px; }
.wa-action-check input:checked + span { color: #087283; border-color: #9ed2d7; background: #edf9fa; font-weight: 600; }
.wa-action-check input:disabled + span { cursor: not-allowed; opacity: .42; }
.wa-savebar { position: absolute; inset: auto 0 0 184px; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 18px; border-top: 1px solid var(--bo-border); background: rgba(255,255,255,.97); }
.wa-save-status { display: flex; align-items: center; gap: 7px; color: var(--bo-muted); font-size: 9px; }
.wa-save-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bo-amber-600); }
.wa-permission-empty { padding: 44px 20px; color: var(--bo-muted); font-size: 11px; text-align: center; }

.wa-log-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.wa-log-card { display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 16px; border: 1px solid var(--bo-border); border-radius: 11px; background: #fff; }
.wa-log-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--bo-teal-700); background: var(--bo-teal-100); }
.wa-log-icon i, .wa-log-icon svg { width: 18px; height: 18px; }
.wa-log-card div { display: grid; gap: 3px; }
.wa-log-card strong { font-size: 18px; }
.wa-log-card span { color: var(--bo-muted); font-size: 9px; }
.wa-log-result { display: inline-flex; align-items: center; gap: 4px; color: var(--bo-green-600); font-size: 9px; font-weight: 700; }
.wa-log-result i { width: 13px; height: 13px; }

.wa-drawer-layer { position: fixed; inset: var(--bo-workspace-header-height) 0 0; z-index: 65; }
.wa-drawer-scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(7, 24, 44, .4); }
.wa-drawer { position: absolute; inset: 0 0 0 auto; display: flex; flex-direction: column; width: min(660px, 58vw); background: #fff; box-shadow: -18px 0 48px rgba(7,24,44,.16); animation: wa-drawer-in .22s ease-out both; }
@keyframes wa-drawer-in { from { opacity: .5; transform: translateX(22px); } }
.wa-drawer.wa-person-modal { inset: 50% auto auto 50%; width: min(1120px, calc(100vw - 72px)); height: min(860px, calc(100vh - 56px)); overflow: hidden; border: 1px solid rgba(190,202,214,.9); border-radius: 16px; box-shadow: 0 28px 80px rgba(7,24,44,.24); transform: translate(-50%,-50%); animation: wa-person-modal-in .24s cubic-bezier(.2,.72,.2,1) both; }
@keyframes wa-person-modal-in { from { opacity: 0; transform: translate(-50%,calc(-50% + 16px)) scale(.985); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.wa-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 25px 18px; border-bottom: 1px solid var(--bo-border); }
.wa-drawer-head h2 { margin: 5px 0 5px; font-size: 21px; }
.wa-drawer-head p { margin: 0; color: var(--bo-muted); font-size: 11px; }
.wa-drawer-body { flex: 1; overflow: auto; padding: 22px 25px 92px; }
.wa-person-progress { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 12px 25px; border-bottom: 1px solid var(--bo-border); background: #f8fafc; }
.wa-person-progress::before { content: ""; position: absolute; top: 30px; left: 12.5%; right: 12.5%; height: 1px; background: #d9e2e9; }
.wa-person-progress button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--bo-muted); background: transparent; cursor: pointer; font: inherit; }
.wa-person-progress button:hover { color: var(--bo-navy-900); background: #fff; }
.wa-person-progress button:focus-visible { outline: 3px solid rgba(13,145,160,.2); outline-offset: 1px; }
.wa-person-progress button span { position: relative; z-index: 1; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #c6d2dc; border-radius: 50%; color: #66758a; background: #fff; font-size: 9px; font-weight: 800; }
.wa-person-progress button strong { position: relative; z-index: 1; font-size: 10px; }
.wa-person-progress button.active { color: #087283; background: #eaf7f8; }
.wa-person-progress button.active span { color: #fff; border-color: var(--bo-teal-700); background: var(--bo-teal-700); }
.wa-person-progress button.complete:not(.active) { color: #087283; }
.wa-person-progress button.complete:not(.active) span { color: #087283; border-color: #9ed2d7; background: #e8f7f8; }
.wa-person-progress button.error { color: var(--bo-red-600); background: #fff2f3; }
.wa-person-progress button.error span { color: #fff; border-color: var(--bo-red-600); background: var(--bo-red-600); }
.wa-error-summary { display: flex; align-items: center; gap: 9px; padding: 10px 25px; color: #8f2431; border-bottom: 1px solid #efd0d4; background: #fff3f4; font-size: 9px; }
.wa-error-summary strong { font-size: 10px; }
.wa-error-summary[hidden] { display: none; }
.wa-person-modal .wa-drawer-head { padding: 18px 25px 15px; }
.wa-person-modal .wa-drawer-head h2 { font-size: 20px; }
.wa-person-modal .wa-drawer-body { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-content: start; align-items: start; gap: 18px; padding: 20px 25px 96px; scroll-behavior: smooth; background: #f5f7f9; }
.wa-person-modal .wa-form-section { min-width: 0; margin: 0; padding: 18px; scroll-margin-top: 18px; border: 1px solid var(--bo-border); border-radius: 11px; background: #fff; }
.wa-person-modal #wa-person-permission, .wa-person-modal #wa-person-warehouse { grid-column: 1 / -1; }
.wa-person-modal .wa-inline-permission-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.wa-person-modal .wa-inline-permission-group { border-right: 1px solid var(--bo-border); }
.wa-person-modal .wa-inline-permission-group:nth-child(even) { border-right: 0; }
.wa-person-modal .wa-inline-permission-group:last-child { border-bottom: 1px solid var(--bo-border); }
.wa-person-modal .wa-warehouse-grid { grid-template-columns: repeat(4,1fr); }
.wa-person-modal .wa-drawer-foot { padding: 0 25px; border-radius: 0 0 16px 16px; }
.wa-dialog-overlay { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 28px; background: rgba(7,24,44,.48); backdrop-filter: blur(3px); animation: wa-overlay-in .16s ease-out both; }
@keyframes wa-overlay-in { from { opacity: 0; } }
.wa-decision-card, .wa-review-card { width: min(470px,100%); padding: 24px; border: 1px solid var(--bo-border); border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(7,24,44,.24); }
.wa-decision-card { text-align: center; }
.wa-decision-card h2, .wa-review-card h2 { margin: 10px 0 6px; font-size: 18px; }
.wa-decision-card p, .wa-review-card p { margin: 0; color: var(--bo-muted); font-size: 10px; line-height: 1.6; }
.wa-decision-card .wa-drawer-actions, .wa-review-card > .wa-drawer-actions { justify-content: flex-end; margin-top: 20px; }
.wa-decision-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto; border-radius: 10px; }
.wa-decision-icon svg { width: 20px; height: 20px; }
.wa-decision-icon.warning { color: #9a6411; background: #fff4d8; }
.wa-decision-icon.ok { flex: 0 0 auto; margin: 0; color: #087283; background: #e8f7f8; }
.wa-review-card { width: min(590px,100%); }
.wa-review-head { display: flex; align-items: flex-start; gap: 13px; }
.wa-review-head h2 { margin-top: 4px; }
.wa-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.wa-review-grid > div { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--bo-border); border-radius: 8px; background: #f8fafc; }
.wa-review-grid > div.wide { grid-column: 1 / -1; }
.wa-review-grid span { color: var(--bo-muted); font-size: 8px; }
.wa-review-grid strong { font-size: 10px; }
.wa-review-warning { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 8px; color: #805912; background: #fff4d8; font-size: 9px; line-height: 1.5; }
.wa-review-warning svg { flex: 0 0 auto; width: 15px; height: 15px; }
.wa-main .btn svg[data-lucide="loader-circle"] { animation: wa-spin .75s linear infinite; }
@keyframes wa-spin { to { transform: rotate(360deg); } }
.wa-drawer-foot { position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 25px; border-top: 1px solid var(--bo-border); background: rgba(255,255,255,.97); }
.wa-drawer-foot small { color: var(--bo-muted); font-size: 9px; }
.wa-drawer-actions { display: flex; gap: 8px; }
.wa-form-section { margin-bottom: 22px; padding-bottom: 21px; border-bottom: 1px solid var(--bo-border); }
.wa-form-section:last-child { border: 0; }
.wa-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.wa-section-head h3 { margin: 0 0 4px; font-size: 13px; }
.wa-section-head p { margin: 0; color: var(--bo-muted); font-size: 9px; line-height: 1.5; }
.wa-field { display: grid; gap: 6px; margin-bottom: 13px; }
.wa-field > span { color: #536176; font-size: 10px; font-weight: 600; }
.wa-field input, .wa-field select, .wa-field textarea { width: 100%; min-height: 41px; padding: 0 11px; border: 1px solid var(--bo-border-strong); border-radius: 8px; color: var(--bo-ink); background: #fff; font-size: 11px; }
.wa-field input[readonly] { color: var(--bo-muted); background: #f3f6f8; }
.wa-field input[aria-invalid="true"], .wa-field select[aria-invalid="true"], .wa-field textarea[aria-invalid="true"] { border-color: var(--bo-red-600); box-shadow: 0 0 0 3px rgba(190, 50, 65, .08); }
.wa-field textarea { min-height: 80px; padding-top: 10px; resize: vertical; }
.wa-field small { color: var(--bo-muted); font-size: 9px; line-height: 1.5; }
.wa-inline-error { display: block; margin-top: 2px; color: var(--bo-red-600) !important; font-size: 9px; font-weight: 600; }
.wa-warehouse-grid > .wa-inline-error { grid-column: 1 / -1; }
.wa-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wa-required { color: var(--bo-red-600); }
.wa-binding-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 13px; }
.wa-binding-modes button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 0 12px; border: 1px solid var(--bo-border-strong); border-radius: 8px; color: #5f6f82; background: #fff; font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease; }
.wa-binding-modes button:hover { color: var(--bo-navy-900); border-color: #9ed2d7; background: #f7fcfc; }
.wa-binding-modes button:focus-visible { outline: 3px solid rgba(13, 145, 160, .18); outline-offset: 2px; }
.wa-binding-modes button.active { color: #087283; border-color: #8bcbd1; background: #edf9fa; box-shadow: inset 0 0 0 1px rgba(8,114,131,.08); }
.wa-binding-modes svg { width: 15px; height: 15px; }
.wa-inline-position { margin: 2px 0 4px; padding: 14px; border: 1px solid #b9dfe3; border-radius: 10px; background: #f3fbfc; }
.wa-inline-position-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.wa-inline-position-head > div { display: grid; gap: 3px; }
.wa-inline-position-head strong { color: var(--bo-ink); font-size: 11px; }
.wa-inline-position-head p { margin: 0; color: var(--bo-muted); font-size: 9px; line-height: 1.5; }
.wa-inline-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; color: var(--bo-teal-700); background: #dff3f5; }
.wa-inline-icon svg { width: 16px; height: 16px; }
.wa-inline-position .wa-field-row { margin-bottom: 0; }
.wa-inline-position .wa-field { margin-bottom: 0; }
.wa-binding-preview { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 11px; border: 1px dashed #b9c8d6; border-radius: 9px; background: #fbfdfe; }
.wa-binding-node { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 9px; border-radius: 7px; color: var(--bo-navy-900); background: #edf2f5; font-size: 9px; font-weight: 700; }
.wa-binding-node.position { color: #087283; background: #e8f7f8; }
.wa-binding-node svg, .wa-binding-arrow svg { width: 14px; height: 14px; }
.wa-binding-arrow { display: inline-flex; color: var(--bo-muted); }
.wa-binding-preview .wa-tag { margin-left: auto; }
.wa-inherited-permission { padding: 13px; border: 1px solid var(--bo-border); border-radius: 9px; background: #fbfdfe; }
.wa-inherited-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-inherited-head > div { display: grid; gap: 3px; }
.wa-inherited-head strong { font-size: 11px; }
.wa-inherited-head span { color: var(--bo-muted); font-size: 9px; }
.wa-inherited-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--bo-border); }
.wa-inherited-caps > span { display: inline-flex; align-items: center; gap: 4px; min-height: 27px; padding: 0 8px; border-radius: 6px; color: #087283; background: #e8f7f8; font-size: 9px; font-weight: 650; }
.wa-inherited-caps svg { width: 12px; height: 12px; }
.wa-inherited-permission-list { display: grid; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--bo-border); }
.wa-inherited-permission-row { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: start; padding: 7px 8px; border-radius: 6px; background: #f5f8fa; }
.wa-inherited-permission-row strong { font-size: 9px; }
.wa-inherited-permission-row span { color: var(--bo-muted); font-size: 8px; line-height: 1.55; }
.wa-permission-placeholder { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; color: var(--bo-muted); font-size: 9px; }
.wa-permission-placeholder svg { width: 16px; height: 16px; }
.wa-inline-permission-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.wa-inline-permission-toolbar > div { display: grid; gap: 3px; }
.wa-inline-permission-toolbar strong { font-size: 11px; }
.wa-inline-permission-toolbar span { color: var(--bo-muted); font-size: 9px; }
.wa-permission-count { flex: 0 0 auto; padding: 6px 8px; border-radius: 6px; color: #087283 !important; background: #e8f7f8; font-weight: 700; }
.wa-template-field { display: grid; grid-template-columns: auto minmax(220px,340px); align-items: center; justify-content: end; gap: 10px; margin-bottom: 10px; }
.wa-template-field > span { color: #536176; font-size: 9px; font-weight: 650; }
.wa-template-field select { min-height: 36px; padding: 0 10px; border: 1px solid var(--bo-border-strong); border-radius: 7px; color: var(--bo-ink); background: #fff; font-size: 9px; }
.wa-inline-permission-editor { overflow: hidden; border: 1px solid var(--bo-border); border-radius: 9px; }
.wa-inline-permission-editor[aria-invalid="true"] { border-color: var(--bo-red-600); box-shadow: 0 0 0 3px rgba(190,50,65,.08); }
.wa-inline-permission-editor > .wa-inline-error { padding: 0 12px 10px; }
.wa-inline-permission-group { border-bottom: 1px solid var(--bo-border); }
.wa-inline-permission-group:last-child { border-bottom: 0; }
.wa-inline-permission-group summary { display: flex; align-items: center; min-height: 42px; padding: 0 12px; color: var(--bo-ink); background: #f8fafc; cursor: pointer; list-style: none; }
.wa-inline-permission-group summary::-webkit-details-marker { display: none; }
.wa-inline-permission-group summary span { font-size: 10px; font-weight: 700; }
.wa-inline-permission-group summary small { margin-left: auto; color: var(--bo-muted); font-size: 8px; }
.wa-inline-permission-group summary svg { width: 14px; height: 14px; margin-left: 8px; transition: transform .16s ease; }
.wa-inline-permission-group[open] summary svg { transform: rotate(180deg); }
.wa-inline-permission-row { padding: 12px; border-top: 1px solid #edf1f5; }
.wa-inline-page { display: flex; align-items: flex-start; gap: 8px; }
.wa-inline-page input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--bo-teal-700); }
.wa-inline-page > span { display: grid; gap: 2px; }
.wa-inline-page strong { font-size: 10px; }
.wa-inline-page small { color: var(--bo-muted); font-size: 8px; }
.wa-inline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 24px; }
.wa-inline-actions label { position: relative; }
.wa-inline-actions input { position: absolute; opacity: 0; }
.wa-inline-actions span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border: 1px solid var(--bo-border); border-radius: 6px; color: var(--bo-muted); background: #fff; font-size: 8px; cursor: pointer; }
.wa-inline-actions input:checked + span { color: #087283; border-color: #9ed2d7; background: #edf9fa; font-weight: 650; }
.wa-inline-actions input:disabled + span { cursor: not-allowed; opacity: .42; }
.wa-scope-note.warning { color: #805912; background: #fff8e8; }
.wa-scope-note.warning svg { color: #a76d0b; }
.wa-password-wrap { position: relative; display: block; }
.wa-password-wrap input { padding-right: 44px; }
.wa-password-toggle { position: absolute; top: 50%; right: 5px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 7px; color: var(--bo-muted); background: transparent; transform: translateY(-50%); cursor: pointer; }
.wa-password-toggle:hover { color: var(--bo-navy-900); background: #f3f6f8; }
.wa-lookup-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.wa-lookup-result { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid #bde6d9; border-radius: 9px; background: #f0fcf7; }
.wa-lookup-result .wa-tag { margin-left: auto; }
.wa-lookup-result.is-warning { border-color: #edd8a7; background: #fffbf0; }
.wa-lookup-feedback { display: flex; align-items: center; gap: 8px; min-height: 38px; margin-top: 8px; padding: 0 11px; border-radius: 8px; color: var(--bo-muted); background: #f5f8fa; font-size: 9px; }
.wa-lookup-feedback svg { width: 14px; height: 14px; color: var(--bo-teal-700); }
.wa-lookup-feedback.checking svg { animation: wa-lookup-pulse .8s ease-in-out infinite alternate; }
@keyframes wa-lookup-pulse { to { opacity: .35; transform: scale(.88); } }
.wa-lookup-missing { margin-top: 10px; padding: 14px; border: 1px solid #b9dfe3; border-radius: 9px; color: var(--bo-ink); background: #f3fbfc; font-size: 10px; line-height: 1.55; }
.wa-lookup-missing .wa-field-row { margin-top: 13px; }
.wa-lookup-missing .wa-field { margin-bottom: 0; }
.wa-warehouse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.wa-check-card { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 8px 10px; border: 1px solid var(--bo-border); border-radius: 8px; cursor: pointer; }
.wa-check-card:has(input:checked) { border-color: #9ed2d7; background: #edf9fa; }
.wa-check-card input { width: 15px; height: 15px; accent-color: var(--bo-teal-700); }
.wa-check-card:has(input:disabled) { cursor: not-allowed; opacity: .68; }
.wa-check-card span { display: grid; gap: 2px; }
.wa-check-card strong { font-size: 10px; }
.wa-check-card small { color: var(--bo-muted); font-size: 8px; }
.wa-position-picker { margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.wa-position-picker legend { margin-bottom: 10px; font-size: 12px; font-weight: 600; }
.wa-position-picker legend small { color: var(--bo-muted); font-weight: 400; margin-left: 8px; }
.wa-position-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wa-position-options .wa-check-card { min-height: 60px; }
.wa-position-options .wa-check-card strong { font-size: 12px; }
.wa-position-options .wa-check-card small { font-size: 11px; line-height: 1.5; }
.wa-position-options .wa-check-card span { min-width: 0; overflow-wrap: anywhere; }
.wa-position-options .wa-check-card input { flex-shrink: 0; }
.wa-position-options .wa-check-card:focus-within { outline: 2px solid var(--bo-teal-700); outline-offset: 2px; }
.wa-position-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-position-tags .wa-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.wa-more-positions { cursor: pointer; min-width: 28px; min-height: 28px; }
.wa-position-source { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bo-border); }
.wa-position-source summary { cursor: pointer; font-size: 12px; color: var(--bo-muted); margin-bottom: 12px; }
.wa-position-source .wa-inherited-head { margin-top: 12px; }
.wa-binding-node.position { min-width: 0; overflow-wrap: anywhere; }
.wa-audit-snapshots { display: grid; gap: 16px; margin-top: 16px; }
.wa-audit-snapshots > section { padding: 12px; border: 1px solid var(--bo-border); border-radius: 8px; }
.wa-audit-snapshots h4 { margin: 0 0 10px; }
.wa-audit-snapshots p { font-size: 12px; overflow-wrap: anywhere; }
.wa-review-card { max-height: 100%; overflow: auto; }
@media (max-width: 600px) { .wa-position-options { grid-template-columns: 1fr; } }
.wa-scope-note { display: flex; gap: 8px; margin-top: 10px; padding: 10px; border-radius: 8px; color: #5f6f82; background: #f5f8fa; font-size: 9px; line-height: 1.55; }
.wa-scope-note i, .wa-scope-note svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--bo-teal-700); }
.wa-confirm-card { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--bo-border); border-radius: 10px; background: #f8fafc; }
.wa-confirm-card > i, .wa-confirm-card > svg { width: 22px; height: 22px; color: var(--bo-teal-700); }
.wa-confirm-card div { display: grid; gap: 4px; }
.wa-confirm-card strong { color: var(--bo-ink); font-size: 12px; }
.wa-confirm-card span { color: var(--bo-muted); font-size: 9px; }
.wa-main .btn-danger { color: #fff; border-color: var(--bo-red-600); background: var(--bo-red-600); }
.wa-main .btn-danger:hover { filter: brightness(.94); }
.wa-main [hidden] { display: none !important; }
body.modal-open #prototype-trigger,
body.modal-open #prototype-nav { display: none !important; }
.wa-empty { display: grid; place-items: center; min-height: 360px; padding: 48px; text-align: center; }
.wa-empty i, .wa-empty svg { width: 28px; height: 28px; margin-bottom: 14px; color: var(--bo-muted); }
.wa-empty h2 { margin: 0 0 7px; font-size: 15px; }
.wa-empty p { margin: 0 0 17px; color: var(--bo-muted); font-size: 11px; }

@media (max-width: 1180px) {
  .wa-main { padding-inline: 22px; }
  .wa-position-layout { grid-template-columns: 1fr; }
  .wa-position-detail { position: static; }
  .wa-filter:nth-of-type(2) { display: none; }
  .wa-drawer.wa-person-modal { width: calc(100vw - 36px); }
}

@media (max-width: 900px) {
  .wa-permission-top { align-items: flex-start; gap: 12px; padding-block: 14px; }
  .wa-permission-tools { align-items: stretch; flex-direction: column; }
  .wa-permission-tools .wa-search { width: 220px; }
  .wa-binding-preview .wa-tag { margin-left: 0; }
  .wa-person-modal .wa-drawer-body { grid-template-columns: 1fr; }
  .wa-person-modal #wa-person-permission, .wa-person-modal #wa-person-warehouse { grid-column: auto; }
  .wa-person-modal .wa-inline-permission-editor { grid-template-columns: 1fr; }
  .wa-person-modal .wa-inline-permission-group { border-right: 0; }
  .wa-person-modal .wa-warehouse-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-drawer { animation: none; }
  .wa-person-modal .wa-drawer-body { scroll-behavior: auto; }
  .wa-lookup-feedback.checking svg { animation: none; }
  .wa-dialog-overlay, .wa-main .btn svg[data-lucide="loader-circle"] { animation: none; }
}

/* Sales qualification belongs to personnel business attributes. */
.wa-sales-cell {display:flex;flex-direction:column;align-items:flex-start;gap:6px;}
.wa-sales-cell .wa-text-action {font-size:11px;white-space:nowrap;}
.wa-sales-setting {margin-top:22px;padding:18px;border:1px solid #dce7ef;border-radius:10px;background:#f7fafc;}
.wa-sales-setting>label {display:flex;align-items:flex-start;gap:10px;cursor:pointer;}
.wa-sales-setting input {width:17px;height:17px;margin:2px 0;accent-color:#07849a;flex:none;}
.wa-sales-setting label span {display:grid;gap:5px;}.wa-sales-setting small,.wa-sales-setting>p {color:#637891;font-size:12px;line-height:1.6;}.wa-sales-setting>p{margin:12px 0 0 27px;}
.wa-sales-warning {margin-bottom:18px;}.wa-toolbar {flex-wrap:wrap;}

.wa-main .wa-personnel-table {min-width:1080px;}
.wa-personnel-table td:last-child {padding-inline:8px;}
.wa-personnel-table .wa-row-actions {flex-wrap:nowrap;}
.wa-sales-cell .wa-tag.off {color:#6a7a8c;border-color:#dce4eb;background:#f3f6f8;}
