/* Smart Permissions Add/Edit only. Native controls and permission locking are retained. */
.smart-staff input,.smart-staff select{max-width:100%;min-width:0}
#app .smart-editor.users-page{box-sizing:border-box;width:100%;max-width:1100px;margin:0 auto;padding:0 16px 16px;color:#091953;background:linear-gradient(125deg,#edfaff,#f7fcff 55%,#e3f6ff);font-family:Arial,sans-serif}
#app .smart-editor *{box-sizing:border-box}
#app .smart-editor .smart-brand{height:86px;display:flex;align-items:center;gap:30px;padding:8px 31px}
#app .smart-editor .smart-brand img{width:244px;height:66px;object-fit:cover}
#app .smart-editor .smart-brand>div{border-left:1px solid #9ebee7;padding-left:28px;display:grid;gap:5px}
#app .smart-editor .smart-brand strong{font-size:29px;line-height:1.15;color:#07134c}
#app .smart-editor .smart-brand span{font-size:19px;color:#5471af}
#app .smart-editor [data-smart-form]{padding:12px 14px;border:1px solid #c7e7ff;border-radius:22px;background:linear-gradient(120deg,#fff9,#eafaff99);box-shadow:0 5px 18px #328dcc0d}
#app .smart-editor .smart-editor-heading{position:relative;top:auto;z-index:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:0 0 0 86px;min-height:64px;background:transparent}
#app .smart-editor .smart-editor-heading::before{content:"";position:absolute;left:6px;top:0;width:60px;height:62px;border-radius:17px 17px 24px 24px;background:linear-gradient(135deg,#00d8f5,#007aff 65%,#004cf6);box-shadow:0 5px 10px #087dff38}
#app .smart-editor .smart-editor-heading::after{content:"";position:absolute;left:20px;top:14px;width:32px;height:35px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 2 3 6v6c0 5 5 8 9 10 4-2 9-5 9-10V6z'/%3E%3Cpath fill='none' stroke='%230078ff' stroke-width='2.5' d='m7 12 3 3 7-7'/%3E%3C/svg%3E") center/contain no-repeat;pointer-events:none}
#app .smart-editor .smart-editor-heading h1{margin:0 0 4px;font:700 32px/1.15 Arial,sans-serif;letter-spacing:-.6px;color:#09164e}
#app .smart-editor .smart-editor-heading p{margin:0;color:#516ba6;font:400 16px/1.35 Arial,sans-serif}
#app .smart-editor .smart-editor-actions{display:flex;gap:12px;flex:none}
#app .smart-editor .smart-editor-actions button{height:50px;min-width:156px;padding:0 18px;border:1px solid #84b6ff;border-radius:14px;background:linear-gradient(120deg,#fff,#edf8ff);font:700 15px Arial;color:#081650;cursor:pointer;box-shadow:0 5px 10px #2783d919}
#app .smart-editor .smart-editor-actions .users-primary{min-width:190px;color:#fff;background:linear-gradient(125deg,#00c5ed,#007bff 55%,#003ce7);border-color:#11bcff;font-size:18px}
#app .smart-editor .smart-editor-actions .users-primary::before{content:"";display:inline-block;vertical-align:-4px;width:23px;height:23px;margin-right:14px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M4 3h13l4 4v14H3V3zM7 3v6h10V3M7 21v-8h10v8M14 4v3'/%3E%3C/svg%3E") center/contain no-repeat}
#app .smart-editor .smart-editor-actions [data-smart-back]::before{content:"×";font-size:24px;vertical-align:-2px;margin-right:12px;color:#4561ac}
#app .smart-editor .smart-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:18px 18px;margin:0 0 12px;padding:16px;border:1px solid #c5e3ff;border-radius:17px;background:linear-gradient(120deg,#f5fcff,#f9fcff);box-shadow:0 4px 9px #387ecc0c}
#app .smart-editor .smart-details>label{position:relative;display:flex;flex-direction:column;min-width:0;gap:4px;padding-left:52px;font:600 13px/1.25 Arial;color:#091750}
#app .smart-editor .smart-detail-icon{position:absolute;left:0;top:0;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eee9ff;color:#6650ff}
#app .smart-editor .smart-detail-icon svg{width:23px;height:23px;stroke-width:2.5}
#app .smart-editor .smart-details>label:nth-child(2n) .smart-detail-icon{background:#dff7ff;color:#008aff}
#app .smart-editor .smart-details>label:nth-child(6) .smart-detail-icon{background:#d9f9f2;color:#00aaa6}
#app .smart-editor .smart-details input,#app .smart-editor .smart-details select{display:block;width:100%;min-width:0;height:40px;min-height:40px;max-height:none;margin:0;padding:8px 12px;border:1px solid #b2d3ff;border-radius:9px;background:linear-gradient(120deg,#fff,#f4faff);color:#091a55;font:500 14px Arial;box-shadow:0 4px 9px #4b92cb0d}
#app .smart-editor .smart-details input[readonly]{color:#5773a7}
#app .smart-editor .smart-password{position:relative;display:block;min-width:0}
#app .smart-editor .smart-password input{padding-right:38px}
#app .smart-editor .smart-password-eye{position:absolute;right:4px;top:2px;width:34px;height:36px;border:0;border-radius:7px;background:transparent;color:#4564aa;cursor:pointer;padding:7px}
#app .smart-editor .smart-password-eye svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2}
#app .smart-editor .smart-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0;align-items:start;grid-template-rows:none}
#app .smart-editor .smart-module-column{display:flex;flex-direction:column;gap:12px;min-width:0}
#app .smart-editor .smart-module{--tone:#007bff;--tint:#dff5ff;min-width:0;border:1px solid #9bd7ff;border-radius:17px;background:linear-gradient(120deg,#fff,#f6fbff);box-shadow:0 4px 8px #278bc415;overflow:visible}
#app .smart-editor .smart-module:has(.violet){--tone:#7422ff;--tint:#eee0ff;border-color:#d7b8ff}
#app .smart-editor .smart-module:has(.orange){--tone:#ff7000;--tint:#fff0d8;border-color:#ffce92}
#app .smart-editor .smart-module:has(.green){--tone:#00a6a0;--tint:#ddfae4;border-color:#a9eabd}
#app .smart-editor .smart-module:has(.pink){--tone:#ff0084;--tint:#ffe3f4;border-color:#f5b8e7}
#app .smart-editor .smart-module:has(.teal){--tone:#007aff;--tint:#ddf8ff}
#app .smart-editor .smart-module>header{display:flex;align-items:center;gap:16px;min-height:55px;padding:5px 14px;border-radius:16px 16px 0 0;background:linear-gradient(145deg,#ffffff,var(--tint));overflow:visible}
#app .smart-editor .smart-module-icon{display:grid;place-items:center;width:68px;height:44px;flex:0 0 68px;margin-right:6px;border-radius:13px;background:linear-gradient(130deg,#ffffff99,var(--tint));color:var(--tone);filter:drop-shadow(0 3px 3px #257fc322)}
#app .smart-editor .smart-module-icon{--icon:#007aff;background:linear-gradient(130deg,#fff,var(--tint))}
#app .smart-editor .smart-module-icon.violet{--icon:#8d00ff}
#app .smart-editor .smart-module-icon.orange{--icon:#ff9100}
#app .smart-editor .smart-module-icon.green{--icon:#02bc15}
#app .smart-editor .smart-module-icon.pink{--icon:#ff0087}
#app .smart-editor .smart-module-icon.teal{--icon:#00bcb5}
#app .smart-editor .smart-module-icon.slate{--icon:#4563a2}
#app .smart-editor .smart-module-icon svg{width:44px;height:44px;padding:4px;border-radius:9px;stroke-width:2.4;background:linear-gradient(135deg,color-mix(in srgb,var(--icon),white 20%),var(--icon));color:white;box-shadow:0 3px 6px color-mix(in srgb,var(--icon) 20%,transparent)}
#app .smart-editor .smart-module .smart-check{display:flex;flex-direction:row;align-items:center;gap:16px;margin:0;padding:1px 0;min-height:25px;height:auto;max-height:none;font:400 15px/1.4 Arial;color:#3f5794;overflow:visible;overflow-wrap:anywhere;cursor:pointer}
#app .smart-editor .smart-module>header .smart-check{flex:1;min-width:0;gap:8px;font-size:20px;font-weight:700;color:var(--tone)}
#app .smart-editor .smart-module>header .smart-check>span{flex:1}
#app .smart-editor .smart-module>header .smart-check>input{order:1}
#app .smart-editor .smart-module>header h3{flex:1;margin:0;font:700 16px/1.2 Arial;color:var(--tone)}
#app .smart-editor .smart-module-body{padding:8px 31px 12px;min-height:0;height:auto;max-height:none;overflow:visible}
#app .smart-editor .smart-module-body[hidden]{display:none}
#app .smart-editor [data-module="billing.access"]>.smart-module-body{padding-block:6px 5px}
#app .smart-editor :is([data-module="customers.access"],[data-module="purchase.access"])>.smart-module-body{padding-block:5px 9px}
#app .smart-editor [data-module="dealers.access"]>.smart-module-body{padding-block:5px 6px}
#app .smart-editor [data-module="gst.access"]>.smart-module-body{padding-block:10px 16px}
#app .smart-editor [data-module="gst.access"]>.smart-module-body .smart-check{min-height:26px}
#app .smart-editor [data-module="staff.access"]>.smart-module-body{padding-block:5px 7px}
#app .smart-editor :is([data-module="staff.attendance"],[data-module="staff.salary_ledger"])>.smart-module-body{padding-block:3px 5px}
#app .smart-editor :is([data-module="staff.attendance"],[data-module="staff.salary_ledger"])>.smart-module-body .smart-check{min-height:22px}
#app .smart-editor [data-module="settings.access"]>.smart-module-body{padding-block:4px}
#app .smart-editor [data-module="support.access"]>.smart-module-body{padding-block:8px 9px}
#app .smart-editor .smart-primary-grid :is([data-module="staff.attendance"],[data-module="staff.salary_ledger"],[data-module="support.access"]){margin-top:-2px}
#app .smart-editor [data-module="dashboard"] .smart-module-body{min-height:100px}
#app .smart-editor .smart-module-note{margin:8px -16px 0;padding:9px 12px;border-radius:9px;background:#eaf6ff;font:400 14px/1.35 Arial;color:#4364a8}
#app .smart-editor .smart-module-note::before{content:"ⓘ";color:#007aff;font-weight:bold;margin-right:9px}
#app .smart-editor .smart-collapse{flex:0 0 28px;width:28px;height:34px;min-height:34px;padding:5px;border:0;border-radius:7px;background:transparent;color:#334aa0;cursor:pointer}
#app .smart-editor .smart-collapse svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
#app .smart-editor .smart-collapse[aria-expanded="false"] svg{rotate:180deg}
#app .smart-editor input[type="checkbox"]{appearance:none!important;position:static!important;display:block!important;width:21px!important;height:21px!important;min-width:21px!important;min-height:21px!important;max-width:none!important;max-height:none!important;flex:0 0 21px!important;margin:0!important;padding:0!important;accent-color:#007aff;box-shadow:none!important;align-self:center;border:1.5px solid #92a1c0!important;border-radius:4px!important;background:#fff!important;cursor:pointer}
#app .smart-editor input[type="checkbox"]:checked{border-color:#007aff!important;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='m5 12 5 5L20 5'/%3E%3C/svg%3E") center/85% no-repeat,linear-gradient(130deg,#0099ff,#0068ff)!important}
#app .smart-editor input[type="checkbox"]:indeterminate{border-color:#007aff!important;background:linear-gradient(white,white) center/65% 3px no-repeat,linear-gradient(130deg,#0099ff,#0068ff)!important}
#app .smart-editor input[type="checkbox"]:disabled{cursor:not-allowed}
#app .smart-editor .smart-module>header input[type="checkbox"],#app .smart-editor .smart-active input{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;flex-basis:28px!important}
#app .smart-editor .smart-check:has(input:disabled){cursor:not-allowed}
#app .smart-editor input[type="checkbox"]:disabled:not(:checked):not(:indeterminate){background:#f8fbff!important}
#app .smart-editor :is(input,select,button,summary):focus-visible{outline:2px solid #006aff;outline-offset:3px}
#app .smart-editor .smart-editor-bottom{display:flex;align-items:flex-start;gap:12px;margin-top:12px}
#app .smart-editor .smart-additional{flex:1;min-width:0;padding:12px 16px;border:1px solid #b2d8ff;border-radius:14px;background:#fff}
#app .smart-editor .smart-additional summary{cursor:pointer;font:700 17px/1.3 Arial;color:#006bff}
#app .smart-editor .smart-additional>p{font:400 13px/1.4 Arial;color:#536ca0}
#app .smart-editor .smart-active{display:flex;align-items:center;gap:14px;margin:0;padding:9px 12px;min-height:48px;border-radius:14px;background:#fff;font:600 15px Arial;white-space:nowrap}
#app .smart-editor .users-form-error:empty{display:none}
#app .smart-editor .users-help{font:400 13px/1.4 Arial}
html[data-medaliza-ui-mode="mobile"] #app .medaliza-mobile-shell:has(.smart-editor){max-width:1024px;padding:0 0 calc(100px + env(safe-area-inset-bottom))}
html[data-medaliza-ui-mode="mobile"] #app .medaliza-mobile-shell:has(.smart-editor)>.medaliza-mobile-shell-header{display:none}
html[data-medaliza-ui-mode="mobile"] #app .medaliza-mobile-shell:has(.smart-editor) .medaliza-mobile-shell-content--inner{padding:0}
html[data-medaliza-ui-mode="mobile"] #app .smart-editor.users-page{padding:0 16px 16px!important}
html[data-medaliza-ui-mode="mobile"] #app .smart-editor .smart-details{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}
html[data-medaliza-ui-mode="mobile"] #app .smart-editor .smart-details :is(input,select){height:40px!important;min-height:40px!important}
#app .smart-editor .smart-editor-heading,#app .smart-editor .smart-module>header{flex-wrap:nowrap!important}
#app .smart-editor .smart-editor-heading h1{font-size:34px!important}
#app .smart-editor .smart-editor-heading p{font-size:16px!important}
#app .smart-editor .smart-editor-heading{margin-bottom:14px!important}
html[data-medaliza-ui-mode="mobile"] #app .smart-editor :is(input,select,button){font-family:Arial,sans-serif!important}
#app .smart-editor .smart-editor-actions{flex-wrap:nowrap!important}
@media(min-width:701px){
 #app .smart-editor .smart-primary-grid>.smart-module-column:nth-child(2) .smart-module-body>.smart-check{gap:25px}
 #app .smart-editor .smart-primary-grid>.smart-module-column:nth-child(2) .smart-module-icon{margin-right:8px}
}
@media(min-width:900px){
 #app .smart-editor .smart-editor-heading{padding-right:0}
 #app .smart-editor .smart-editor-actions{position:absolute;right:0;top:-49px}
 #app .smart-editor .smart-details{row-gap:18px;min-height:172px}
}
@media(max-width:700px){
 html[data-medaliza-ui-mode="mobile"] #app .smart-editor.users-page{padding:0 8px 12px!important}
 #app .smart-editor.users-page{padding:0 8px 12px}
 #app .smart-editor .smart-brand{height:70px;padding:8px;gap:12px}
 #app .smart-editor .smart-brand img{width:135px;height:45px}
 #app .smart-editor .smart-brand>div{padding-left:12px;gap:4px}
 #app .smart-editor .smart-brand strong{font-size:19px}
 #app .smart-editor .smart-brand span{font-size:13px}
 #app .smart-editor [data-smart-form]{padding:12px 10px;border-radius:16px}
 #app .smart-editor .smart-editor-heading{flex-wrap:wrap!important;padding-left:48px;gap:12px}
 #app .smart-editor .smart-editor-heading::before{width:36px;height:40px;left:0;font-size:24px}
 #app .smart-editor .smart-editor-heading::after{left:8px;top:9px;width:20px;height:23px}
 #app .smart-editor .smart-editor-heading h1{font-size:23px!important}
 #app .smart-editor .smart-editor-heading p{font-size:13px!important}
 #app .smart-editor .smart-editor-actions{width:100%;margin-left:-48px}
 #app .smart-editor .smart-editor-actions button{flex:1;min-width:0!important;height:44px;font-size:14px}
 #app .smart-editor .smart-editor-actions .users-primary{font-size:14px}
 #app .smart-editor .smart-editor-actions .users-primary::before{width:18px;height:18px;margin-right:7px}
 html[data-medaliza-ui-mode="mobile"] #app .smart-editor .smart-details{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:10px;gap:12px 10px!important}
 #app .smart-editor .smart-details>label{padding-left:0;font-size:12px;gap:5px}
 #app .smart-editor .smart-detail-icon{display:none}
 #app .smart-editor .smart-details input,#app .smart-editor .smart-details select{height:44px!important;min-height:44px!important;padding:7px!important;font-size:16px!important}
 #app .smart-editor .smart-password input{padding-right:34px!important}
 #app .smart-editor .smart-password-eye{top:4px}
 #app .smart-editor .smart-permission-grid{gap:10px}
 #app .smart-editor .smart-module-column{gap:10px}
 #app .smart-editor .smart-module>header{padding:6px;gap:3px!important;min-height:48px;flex-wrap:nowrap!important}
 #app .smart-editor .smart-module-icon{width:20px;height:27px;flex-basis:20px;margin-right:0}
 #app .smart-editor .smart-module-icon svg{width:20px;height:25px;padding:2px;border-radius:5px}
 #app .smart-editor .smart-module>header .smart-check{font-size:12px;gap:3px;letter-spacing:-.35px}
 #app .smart-editor .smart-module>header .smart-check>span{white-space:nowrap}
 #app .smart-editor .smart-module>header input[type="checkbox"]{width:21px!important;height:21px!important;min-width:21px!important;min-height:21px!important;flex-basis:21px!important}
 #app .smart-editor .smart-collapse{width:18px;height:36px;min-height:36px;flex-basis:18px;padding:1px;margin-left:auto}
 #app .smart-editor .smart-module-body{padding:8px 8px 10px}
 #app .smart-editor .smart-primary-grid .smart-module-body{padding:8px 8px 10px}
 #app .smart-editor .smart-primary-grid :is([data-module="staff.attendance"],[data-module="staff.salary_ledger"],[data-module="support.access"]){margin-top:0}
 #app .smart-editor .smart-module .smart-check{gap:7px;font-size:12px;min-height:30px}
 #app .smart-editor .smart-module .smart-module-body .smart-check{min-height:30px}
 #app .smart-editor [data-module="dashboard"] .smart-module-body{min-height:0}
 #app .smart-editor .smart-module-note{font-size:11px;margin:6px 0 0;padding:7px}
 #app .smart-editor .smart-editor-bottom{flex-wrap:wrap}
 #app .smart-editor .smart-additional{flex-basis:100%}
 #app .smart-editor .smart-additional summary{font-size:15px}
 #app .smart-editor .smart-additional .smart-permission-grid{grid-template-columns:1fr}
}
