:root{color:#191f28;background:#f8f9fb;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}.appShell{width:min(1120px,calc(100% - 40px));margin:0 auto;padding:36px 0 56px}.appHeader{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.brandLabel{display:block;margin-bottom:6px;color:#6b7684;font-size:13px;font-weight:700}h1,h2,h3,p{margin:0}h1{font-size:30px;line-height:1.2;letter-spacing:0}h2{font-size:22px;line-height:1.3;letter-spacing:0}h3{font-size:16px;letter-spacing:0}.headerActions,.formActions{display:flex;align-items:center;gap:8px}.primaryButton,.ghostButton,.backButton,.iconButton{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border:0;border-radius:8px;padding:0 16px;font-weight:700}.primaryButton{background:#3182f6;color:#fff}.ghostButton,.backButton{background:#eef1f4;color:#333d4b}.backButton{margin-bottom:22px}.iconButton{width:40px;padding:0;background:#f2f4f6;color:#4e5968}.iconButton.danger{color:#e42939}button:disabled{opacity:.55;cursor:not-allowed}.toast{margin-bottom:16px;border-radius:8px;padding:14px 16px;background:#eef6ff;color:#1b64da;font-weight:700}.metricGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.metricCard,.pageSurface{border:1px solid #edf0f3;border-radius:8px;background:#fff;box-shadow:0 1px 2px #00000008}.metricCard{padding:18px;min-width:0}.metricCard span{display:block;color:#6b7684;font-size:13px;font-weight:700;white-space:nowrap}.metricCard strong{display:block;margin-top:8px;font-size:24px;letter-spacing:0}.pageSurface{padding:24px;margin-top:14px}.sectionHeader{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.sectionHeader p,.detailHero p,.policyRow span,.grantRow span,.typeCard span,.optionItem span{color:#6b7684;font-size:13px}.searchBox{display:flex;align-items:center;gap:8px;width:280px;min-height:42px;border-radius:8px;padding:0 12px;background:#f2f4f6;color:#8b95a1}.searchBox.full{width:100%}.searchBox input,.searchBox input:focus{min-height:auto;border:0;padding:0;background:transparent;outline:none}input,select,textarea{width:100%;min-height:44px;border:1px solid #dfe3e8;border-radius:8px;padding:0 13px;background:#fff;color:#191f28}input:focus,select:focus,textarea:focus{border-color:#3182f6;outline:3px solid rgb(49 130 246 / 14%)}textarea{min-height:116px;padding:12px 13px;resize:vertical;line-height:1.5}label{display:grid;gap:8px;color:#4e5968;font-size:13px;font-weight:800}.policyRows{display:grid;gap:6px}.policyRow{display:grid;grid-template-columns:20px 34px 42px minmax(0,1fr) auto auto 22px;align-items:center;gap:12px;min-height:68px;border:0;border-radius:8px;padding:12px;background:#fff;color:#191f28;text-align:left;cursor:pointer}.rowToggle{display:flex;align-items:center;justify-content:center}.dragHandle{display:grid;place-items:center;color:#b0b8c1}.policyRow.dragging{opacity:.55}.orderBadge{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#f2f4f6;color:#6b7684;font-size:13px;font-weight:800}.policyRow:hover,.optionItem:hover,.typeCard:hover{background:#f7f9fc}.rowMain strong,.rowMain span{display:block;min-width:0;overflow-wrap:anywhere}.rowMain strong{margin-bottom:4px;font-size:15px}.rowMain span{line-height:1.45}.targetIcon{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:#eef6ff;color:#3182f6}.targetIcon.large{width:52px;height:52px}.status{display:inline-flex;align-items:center;justify-self:start;min-height:28px;border-radius:999px;padding:0 10px;font-size:12px;font-weight:800}.status.ok{background:#e9f8ef;color:#0c8f4c}.status.warn{background:#fff3e0;color:#b56b00}.actionBadge{display:inline-flex;align-items:center;justify-content:center;min-width:52px;min-height:30px;border-radius:999px;padding:0 11px;font-size:13px;font-weight:800}.actionBadge.allow{background:#e9f8ef;color:#0c8f4c}.actionBadge.block{background:#ffecef;color:#e42939}.actionBadge.neutral{background:#f2f4f6;color:#4e5968}.externalBadge{display:inline-flex;align-items:center;justify-content:center;min-height:32px;min-width:68px;border-radius:999px;padding:0 10px;background:#f2f4f6;color:#6b7684;font-size:12px;font-weight:800;white-space:nowrap}.detailHero{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:14px;margin-bottom:22px}.detailToolbar{display:flex;align-items:center;gap:8px;margin-bottom:14px}.detailSummary{margin-bottom:14px}.infoPanel,.grantPanel,.editPanel{display:grid;gap:14px;border-radius:8px;padding:18px;background:#f8f9fb}.panelTitleRow{display:flex;align-items:center;justify-content:space-between;gap:16px}.panelTitleRow h3{margin:0}.toggleControl{display:inline-flex;align-items:center;gap:10px;color:#4e5968;font-size:13px;font-weight:900;cursor:pointer}.toggleControl.compact span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.toggleControl input{position:absolute;opacity:0;pointer-events:none}.toggleControl i{position:relative;width:42px;height:24px;border-radius:999px;background:#d8dee5;transition:background .15s ease}.toggleControl i:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000029;transition:transform .15s ease}.toggleControl input:checked+i{background:#3182f6}.toggleControl input:checked+i:after{transform:translate(18px)}.durationField{display:grid;grid-template-columns:1fr 120px;gap:10px}.editPanel{margin-bottom:22px}.editPanel p,.helperText{margin-top:6px;color:#6b7684;font-size:13px}dl{display:grid;grid-template-columns:110px 1fr;gap:10px 14px;margin:0}dt{color:#8b95a1;font-size:13px;font-weight:800}dd{margin:0;color:#333d4b;font-size:13px;overflow-wrap:anywhere}.errorText{color:#e42939;font-size:13px;font-weight:700}.readOnlyNotice{margin-bottom:18px;border-radius:8px;padding:14px 16px;background:#fff6e5;color:#8a5a00;font-size:14px;font-weight:800}.grantList{display:grid;gap:8px}.grantRow{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;min-height:62px;border-radius:8px;padding:10px 12px;background:#f8f9fb}.grantRow strong,.grantRow span{display:block;min-width:0;overflow-wrap:anywhere}.grantMeta{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:250px}.expiry{display:inline-flex;align-items:center;gap:7px;color:#4e5968;font-size:13px;font-weight:700;white-space:nowrap}.createForm{display:grid;gap:18px}.formSection{display:grid;gap:12px;border-radius:8px;padding:18px;background:#f8f9fb}.conditionComposer,.conditionReview{display:grid;gap:14px;border-radius:8px;padding:18px}.conditionComposer{border:1px solid #d6e6ff;background:#f7fbff}.conditionReview{border:1px solid #e5e8eb;background:#fff}.conditionReviewHeader{display:flex;align-items:center;justify-content:space-between;gap:12px}.conditionReviewHeader strong{display:inline-flex;align-items:center;min-height:28px;border-radius:999px;padding:0 10px;background:#f2f4f6;color:#4e5968;font-size:12px;font-weight:900}.sectionHint{margin:0;color:#6b7684;font-size:13px;line-height:1.6}.conditionList{display:grid;gap:8px}.conditionEmpty{border:1px dashed #d8dee5;border-radius:8px;padding:14px;background:#fff;color:#8b95a1;font-size:13px;font-weight:700}.conditionChip{display:flex;align-items:center;justify-content:space-between;gap:10px;border-radius:8px;padding:10px 12px;background:#fff;color:#333d4b;font-size:13px;font-weight:800;min-width:0}.conditionChip span{min-width:0;overflow-wrap:anywhere}.conditionChip button{flex:0 0 auto;border:0;background:transparent;color:#e42939;font-size:12px;font-weight:800}.textButton{border:0;background:transparent;color:#4e5968;font-size:13px;font-weight:900}.addConditionButton{width:fit-content}.stepLabel{color:#3182f6;font-size:13px;font-weight:900}.typeGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.typeGrid.compact .typeCard{min-height:112px}.typeCard{display:grid;align-content:start;gap:10px;min-height:138px;border:1px solid #edf0f3;border-radius:8px;padding:16px;background:#fff;color:#191f28;text-align:left}.typeCard.selected{border-color:#3182f6;background:#f4f9ff}.selector{display:grid;gap:10px}.selectedItem{display:inline-flex;align-items:center;gap:7px;width:fit-content;border-radius:999px;padding:7px 10px;background:#e9f8ef;color:#0c8f4c;font-size:13px;font-weight:800}.actionSelector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.actionSelector button{min-height:44px;border:1px solid #dfe3e8;border-radius:8px;background:#fff;color:#4e5968;font-weight:800}.actionSelector button.selected.allow{border-color:#0c8f4c;background:#e9f8ef;color:#0c8f4c}.actionSelector button.selected.block{border-color:#e42939;background:#ffecef;color:#e42939}.optionList{display:grid;max-height:360px;overflow:auto;border:1px solid #edf0f3;border-radius:8px}.optionItem{display:grid;gap:5px;border:0;border-bottom:1px solid #edf0f3;padding:13px 14px;background:#fff;color:#191f28;text-align:left}.optionItem:last-child{border-bottom:0}.optionItem.selected{background:#f4f9ff}.empty{display:grid;place-items:center;gap:10px;min-height:170px;color:#8b95a1;text-align:center}@media(max-width:920px){.appHeader,.sectionHeader{align-items:stretch;flex-direction:column}.headerActions,.searchBox{width:100%}.metricGrid,.detailGrid,.typeGrid,.policyRow,.detailHero,.grantRow{grid-template-columns:1fr}.grantRow{align-items:start}.grantMeta{justify-content:flex-start;min-width:0;width:100%}}
