.form-drawer-backdrop{position:fixed;inset:0;z-index:28;background:rgba(15,23,42,.46);opacity:0;visibility:hidden;transition:opacity .22s ease,visibility .22s ease;backdrop-filter:blur(1px)}.form-drawer-backdrop.open{opacity:1;visibility:visible}.form-drawer{position:fixed;z-index:29;top:0;right:0;width:min(650px,96vw);height:100vh;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;background:#fff;box-shadow:-18px 0 48px rgba(15,23,42,.18);transform:translateX(102%);visibility:hidden;transition:transform .26s cubic-bezier(.2,.75,.25,1),visibility .26s ease}.form-drawer.open{transform:none;visibility:visible}.form-drawer>header{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 20px;border-bottom:1px solid #e2e8f0;background:#fff}.form-drawer-heading{min-width:0;display:flex;align-items:center;gap:11px}.form-drawer-icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;background:#eef4ff;color:#2563eb;font-size:16px;font-weight:800}.form-drawer-heading small{color:#2563eb;font-size:8px;font-weight:800;letter-spacing:.11em}.form-drawer-heading h2{overflow:hidden;margin:3px 0 0;color:#0f172a;font-size:18px;text-overflow:ellipsis;white-space:nowrap}.form-drawer-close{width:34px;height:34px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#f1f5f9!important;font-size:20px!important}.form-drawer-close:hover{background:#e2e8f0!important}.form-drawer>form{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto auto}.form-drawer-body{overflow-y:auto;padding:20px 22px 32px;background:#f8fafc}.form-drawer-body .drawer-form-intro{margin-bottom:15px;padding-bottom:13px;border-bottom:1px solid #e2e8f0}.form-drawer-body .drawer-form-intro h3{margin:0;color:#0f172a;font-size:13px}.form-drawer-body .drawer-form-intro p{margin:4px 0 0;color:#64748b;font-size:10px;line-height:1.5}.form-drawer-body .form-grid{gap:0 12px}.form-drawer-body .field{margin:10px 0;gap:6px}.form-drawer-body .field label{color:#475569;font-size:10px;font-weight:700}.form-drawer-body .field input,.form-drawer-body .field select,.form-drawer-body .field textarea{border-color:#dbe2ea;border-radius:8px;padding:10px;background:#fff;font-size:11px}.form-drawer-body .field textarea{line-height:1.55;resize:vertical}.form-drawer-body .check{width:fit-content;color:#475569;font-size:10px}.form-drawer-body .check input{width:15px;height:15px;accent-color:#2563eb}.form-drawer-error{display:none;padding:10px 20px;border-top:1px solid #fecaca;background:#fef2f2;color:#b91c1c;font-size:10px}.form-drawer-error.show{display:block}.form-drawer footer{min-height:70px;display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:13px 20px;border-top:1px solid #e2e8f0;background:#fff;box-shadow:0 -5px 18px rgba(15,23,42,.035)}.form-drawer footer button{min-height:39px;padding:8px 14px;font-size:11px}.form-drawer footer button:disabled{cursor:wait;opacity:.6}
@media(max-width:680px){.form-drawer{width:100vw}.form-drawer>header{padding:13px 16px}.form-drawer-body{padding:16px}.form-drawer-body .form-grid{grid-template-columns:1fr}.form-drawer-body .form-grid .full{grid-column:auto}.form-drawer footer{padding:11px 16px}.form-drawer footer button{flex:1}}
@media(prefers-reduced-motion:reduce){.form-drawer,.form-drawer-backdrop{transition:none}}
.role-permission-toolbar{position:sticky;z-index:2;top:-20px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 -22px 14px;padding:13px 22px;border-bottom:1px solid #dbe2ea;background:rgba(248,250,252,.96);backdrop-filter:blur(8px)}.role-permission-toolbar>div:first-child{display:grid;gap:3px}.role-permission-toolbar strong{font-size:13px;color:#0f172a}.role-permission-toolbar span{font-size:10px;color:#64748b}.role-permission-toolbar>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.role-permission-toolbar button{min-height:31px;padding:6px 9px!important;font-size:9px!important}.role-permission-modules{display:grid;gap:10px}.role-permission-module{overflow:hidden;border:1px solid #dbe2ea;border-radius:10px;background:#fff}.role-permission-module>header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid #edf1f5;background:#f8fafc}.role-permission-module>header label{display:flex;align-items:center;gap:9px;color:#1e293b;font-size:11px;font-weight:800}.role-permission-module input{width:15px;height:15px;flex:0 0 auto;accent-color:#2563eb}.ar-module-count{border-radius:999px;background:#e8efff;padding:3px 8px;color:#1d4ed8;font-size:9px}.role-permission-module>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:#edf1f5}.role-permission-item{display:flex;align-items:flex-start;gap:9px;min-width:0;padding:11px 12px;background:#fff;cursor:pointer}.role-permission-item:hover{background:#f8fbff}.role-permission-item>span{display:grid;min-width:0;gap:2px}.role-permission-item b{color:#1e293b;font-size:10px}.role-permission-item small{overflow:hidden;color:#64748b;font-size:9px;line-height:1.4;text-overflow:ellipsis}.role-permission-item code{width:fit-content;margin-top:2px;border-radius:4px;background:#f1f5f9;padding:2px 5px;color:#64748b;font-size:8px}
@media(max-width:680px){.role-permission-toolbar{top:-16px;align-items:stretch;flex-direction:column;margin:0 -16px 12px;padding:11px 16px}.role-permission-toolbar>div:last-child{justify-content:flex-start}.role-permission-module>div{grid-template-columns:1fr}}
body.drawer-open{overflow:hidden}
