/* ===== assets/user-security-ui.css ===== */
.security-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:16px 0}.security-toolbar label{flex:1;min-width:160px}.security-secondary{display:block;color:#738398;font-size:12px;margin-top:5px}.security-dialog{max-width:920px;width:calc(100% - 32px);border:1px solid #d7e3f1;border-radius:18px;padding:22px;color:#1c3654}.security-dialog::backdrop{background:#122b5066}.security-dialog header{display:flex;justify-content:space-between;align-items:center}.security-dialog h2{font-size:20px}.security-dialog input:not([type=checkbox]),.security-dialog select{width:100%;min-height:42px;border:1px solid #cbd9eb;border-radius:8px;padding:8px}.security-dialog button{background:#0968ed;color:white;padding:10px 16px;border-radius:8px}.security-dialog [data-close]{background:#eef4fb;color:#345}.security-dialog fieldset{border:1px solid #dce5f1;border-radius:10px;margin:16px 0;padding:14px}.security-dialog .security-check{display:flex;align-items:center;gap:9px}.security-dialog [data-error]{color:#ad2431}.security-dialog [data-qr]{display:block;max-width:220px;margin:20px auto}.security-dialog pre{white-space:pre-wrap;max-width:260px;overflow-wrap:anywhere;font-size:11px}.security-dialog footer{margin-top:18px}.security-dialog [hidden]{display:none!important}#login-forgot{background:transparent;color:#176ad2;padding:5px 0;font-size:13px}#working-branch-btn{background:#edf5ff;color:#19538b;border-radius:7px;padding:7px 10px}

.security-dialog .security-check input[type=checkbox]{width:18px;min-width:18px;height:18px;flex:0 0 18px;margin:0}.security-dialog .security-check{justify-content:flex-start}.security-dialog .ap-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.security-dialog label{display:block}.security-dialog .security-check{display:flex}@media(max-width:620px){.security-dialog .ap-form-grid{grid-template-columns:1fr}}

.security-dialog label.security-check{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;text-align:left;gap:9px}

.security-scope-help{margin:0 0 12px;color:#66798f;font-size:13px}.security-company{border:1px solid #e0e8f3;border-radius:10px;margin:10px 0;overflow:hidden}.security-company-head{padding:11px 12px;background:#f7faff;font-weight:500}.security-company-head strong{color:#155e9a}.security-branch-list{padding:8px 12px 12px 38px}.security-branch-list[hidden]{display:none!important}.security-branch-check{padding:6px 0}.security-branch-check strong{color:#234d72}

.security-no-branch{color:#6f8092;padding-top:10px;padding-bottom:10px}.security-company-head input:disabled+span{opacity:.58}.security-company-head input:disabled{cursor:not-allowed}


/* POS X workspace selector */
.security-workspace-dialog{width:min(680px,calc(100% - 28px));max-width:680px;padding:0;overflow:hidden;border:1px solid #d4e2f2;border-radius:20px;background:#fff;box-shadow:0 28px 90px #102b4b3d}
.security-workspace-dialog::backdrop{background:#10273f73;backdrop-filter:blur(5px)}
.security-workspace-dialog>header{padding:18px 22px;background:linear-gradient(180deg,#f7faff,#eef5ff);border-bottom:1px solid #dce7f4}
.security-workspace-dialog>header h2{margin:0;color:#173d66;font-size:21px;font-weight:750;letter-spacing:-.01em}
.security-workspace-dialog>header [data-close]{width:36px;height:36px;padding:0;border:1px solid #cad9eb;border-radius:10px;background:#fff;color:#47637f;font-size:22px;line-height:1;box-shadow:0 2px 8px #15395d0d}
.security-workspace-dialog .flow-modal-body{padding:0}
.security-workspace-form{display:grid;gap:0}
.security-workspace-intro{padding:18px 22px 13px}
.security-workspace-kicker{display:inline-flex;align-items:center;min-height:25px;padding:4px 9px;border-radius:999px;background:#eaf3ff;color:#0968ed;font-size:10px;font-weight:800;letter-spacing:.12em}
.security-workspace-intro p{margin:9px 0 0;color:#637a92;font-size:13px;line-height:1.55}
.security-workspace-groups{display:grid;gap:12px;padding:0 22px 18px;max-height:min(52vh,500px);overflow:auto;overscroll-behavior:contain}
.security-workspace-company{border:1px solid #dce7f3;border-radius:14px;background:#fbfdff;overflow:hidden}
.security-workspace-company>header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;background:#f3f7fc;border-bottom:1px solid #e1eaf4}
.security-workspace-company>header>div{display:flex;align-items:center;gap:9px;min-width:0}
.security-workspace-company>header strong{color:#294966;font-size:12px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.security-workspace-company-code{flex:0 0 auto;padding:3px 7px;border-radius:6px;background:#e2efff;color:#0968ed;font-size:10px;font-weight:850;letter-spacing:.04em}
.security-workspace-count{flex:0 0 auto;color:#7a8da2;font-size:10px}
.security-workspace-options{display:grid;gap:8px;padding:10px}
.security-workspace-card{position:relative;display:grid!important;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;margin:0!important;padding:12px 13px;border:1px solid #dce6f1!important;border-radius:11px!important;background:#fff!important;color:inherit!important;text-align:left!important;font:inherit!important;appearance:none;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s,background .15s}
.security-workspace-card:hover{border-color:#9fc6f6;background:#fafdff;box-shadow:0 5px 16px #1e5d9b0d;transform:translateY(-1px)}
.security-workspace-card.is-selected,.security-workspace-card:has(input:checked){border-color:#368af3!important;background:#f1f7ff!important;box-shadow:0 0 0 3px #0b6cf314,0 6px 18px #1a63a912}
.security-workspace-card input{position:absolute!important;opacity:0!important;pointer-events:none;width:1px!important;height:1px!important}
.security-workspace-radio{width:18px;height:18px;border:2px solid #b7c8da;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 4px #fff;transition:.15s}
.security-workspace-card.is-selected .security-workspace-radio,.security-workspace-card:has(input:checked) .security-workspace-radio{border-color:#0968ed;background:#0968ed}
.security-workspace-card-copy{display:grid;gap:2px;min-width:0}
.security-workspace-type{color:#7b90a7;font-size:9px;font-weight:800;letter-spacing:.12em}
.security-workspace-card-copy strong{color:#193d60;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.security-workspace-card-copy small{color:#758aa0;font-size:10px}
.security-workspace-current{align-self:start;padding:4px 7px;border-radius:999px;background:#e9f7ef;color:#2f7b4e;font-size:9px;font-weight:750;white-space:nowrap}
.security-workspace-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 22px 18px;border-top:1px solid #e2eaf3;background:#fbfdff}
.security-workspace-choice{display:grid;gap:2px;min-width:0}
.security-workspace-choice span{color:#8294a8;font-size:10px}
.security-workspace-choice strong{color:#234763;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}
.security-workspace-footer button{flex:0 0 auto;min-width:130px;border:0;border-radius:10px;background:#0968ed;color:#fff;padding:10px 16px;font-weight:750;box-shadow:0 8px 20px #0968ed2b}
.security-workspace-footer button:hover:not(:disabled){background:#075dD7;transform:translateY(-1px)}
.security-workspace-footer button:disabled{background:#cbd8e6;color:#f8fbff;box-shadow:none;cursor:not-allowed}
#working-branch-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #bfd6f1!important;background:#f0f7ff!important;color:#155b9b!important;border-radius:9px!important;padding:7px 11px!important;font-size:11px!important;font-weight:700!important;box-shadow:0 2px 8px #194f850d;transition:.15s}
#working-branch-btn:hover{border-color:#82b4ef!important;background:#e7f2ff!important;color:#074f91!important;transform:translateY(-1px)}
@media(max-width:620px){.security-workspace-dialog{width:calc(100% - 18px);border-radius:15px}.security-workspace-dialog>header,.security-workspace-intro{padding-left:16px;padding-right:16px}.security-workspace-groups{padding-left:12px;padding-right:12px;max-height:58vh}.security-workspace-company>header{align-items:flex-start}.security-workspace-company>header>div{display:grid;gap:4px}.security-workspace-company>header strong{white-space:normal}.security-workspace-card{grid-template-columns:20px minmax(0,1fr)}.security-workspace-current{grid-column:2;justify-self:start;margin-top:3px}.security-workspace-footer{align-items:stretch;padding:12px 14px 14px;flex-direction:column}.security-workspace-choice strong{max-width:none}.security-workspace-footer button{width:100%}}

.security-company-count{margin-left:auto;color:#70849a;font-size:12px;font-weight:600}.security-company-head{display:flex;align-items:center;gap:8px}.security-company-head>span{flex:1}.security-branch-list{background:#fff}.security-branch-check strong{color:#155e9a}

/* v1.3.14.23 multi-company / multi-branch access tree */
.security-scope-help strong{color:#155e9a}.security-company{box-shadow:0 4px 14px rgba(30,72,110,.045)}.security-company-head{min-height:48px}.security-company-head input[type=checkbox]{accent-color:#1677c8}.security-company-head input:indeterminate{accent-color:#1677c8}.security-company-count{white-space:nowrap}.security-branch-check{display:flex;align-items:center;gap:8px}.security-branch-check>span{flex:1}.security-branch-check>small{color:#8797a8;font-size:11px;white-space:nowrap}.security-branch-list{border-top:1px solid #edf2f7}.security-company:has(.security-branch-check input:checked){border-color:#b9d7ee;background:#fbfdff}.security-company-head:has(input:checked),.security-company-head:has(input:indeterminate){background:#eef7ff}.security-no-branch{background:#fbfcfe}

.security-company:has(.security-branch-check input:checked) .security-company-head{background:#eef7ff}.security-company-head{cursor:default}.security-no-branch{padding-left:12px}

/* v1.3.14.34: make Company and Branch assignment controls unmistakably independent */
.security-company-check{flex:1;min-width:0}.security-company-check>input[type=checkbox]{width:20px!important;height:20px!important;min-width:20px!important;opacity:1!important;visibility:visible!important;display:block!important;accent-color:#0968ed}.security-company-check>span{display:block;min-width:0}.security-company-kind,.security-branch-kind{display:inline-block;margin-right:7px;padding:2px 6px;border-radius:999px;background:#eaf3ff;color:#1766ad;font-size:10px;font-weight:800;letter-spacing:.04em}.security-branch-kind{background:#f1f5f9;color:#60758a}.security-company-head:has(.security-company-check input:checked){border-left:4px solid #0968ed}.security-company-head{padding-left:12px}.security-company-count{min-width:80px;text-align:right}

/* v1.3.14.36: explicit Company assignment checkbox */
.security-company-check>input.security-company-checkbox{appearance:auto!important;-webkit-appearance:checkbox!important;position:static!important;width:22px!important;height:22px!important;min-width:22px!important;display:inline-block!important;opacity:1!important;visibility:visible!important;margin:0 10px 0 0!important;accent-color:#0968ed!important}.security-company-select-text{color:#0968ed;font-weight:800}.security-company-head{overflow:visible!important}.security-company-check{overflow:visible!important}
