/* Match the workspace's existing indigo headers, soft borders and readable controls. */
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card{grid-column:1/-1;min-width:0;border:1px solid #bfcee8;border-radius:14px;background:#fff;overflow:hidden}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card>header{display:flex;align-items:center;gap:12px;padding:18px 20px;background:linear-gradient(120deg,#eef0ff,#f6fbff);border-bottom:1px solid #cbd5ed;position:static}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card h3{font-size:18px;font-weight:700;color:#243b76;margin:0 0 4px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card header p{font-size:13px;color:#526784;margin:0;line-height:1.5}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-icon{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:11px;background:#e2e6ff;color:#5146c8;font-size:12px;font-weight:800}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:20px;min-width:0}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid>*{min-width:0}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid label{font-size:14px;font-weight:600;color:#354f76;min-width:0}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid :is(input,select,textarea){box-sizing:border-box;max-width:100%;min-width:0;font-size:14px!important;border-radius:9px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-addresses textarea{width:100%;min-height:132px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.65;resize:vertical}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-addresses small,body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-access-switch small{display:block;margin-top:8px;font-size:12px;font-weight:400;line-height:1.6;color:#566c8b}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-switches{display:grid;gap:12px;align-content:start}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) label.network-access-switch{display:flex;align-items:flex-start;gap:12px;padding:16px;border:1px solid #c7cfee;border-radius:11px;background:#f5f5ff;cursor:pointer}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-access-switch input{appearance:auto!important;flex:0 0 20px;width:20px!important;height:20px!important;min-height:20px!important;margin:2px 0 0;accent-color:#5146ce}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-access-switch strong{font-size:14px;line-height:1.5;color:#243b76}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-access-switch:has(input:checked){border-color:#6a60d6;background:#eeeefe}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .saved-profile-card:has(.network-policy-card)>.saved-profile-body>.profile-edit-grid{gap:20px;background:#f8faff;padding:20px}
@media(max-width:760px){body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid{grid-template-columns:minmax(0,1fr);padding:16px;gap:16px}body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card>header{padding:16px}body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid :is(input,select,textarea){font-size:16px!important}body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .saved-profile-card:has(.network-policy-card)>.saved-profile-body>.profile-edit-grid{padding:12px}}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-bound-mac{display:grid;gap:7px;padding:0 2px}body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-session-note{margin:0;padding:12px 14px;border-radius:9px;background:#edf6ff;border:1px solid #c6dcee;color:#35547b;font-size:12px;line-height:1.6}

body.portal-shell #add-user-form #network .onboarding-network-layout{display:grid;gap:18px;margin-top:0}
body.portal-shell #add-user-form #network .network-policy-card{margin:0}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card>header{justify-content:flex-start!important;align-items:center!important;gap:12px!important}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card>header>div{flex:1;min-width:0;margin:0!important;text-align:left!important}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-policy-card h3{font-size:18px!important;font-weight:700!important;margin:0 0 4px!important}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) label.network-access-switch{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:12px!important}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-access-switch>span{display:block!important;flex:1;min-width:0;margin:0!important}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-access-switch>input{position:static!important;opacity:1!important;display:block!important;flex:0 0 20px!important}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-policy-grid:has(>label[hidden]>select[name=static_plan_id])>label:has(>select[name=ip_address_mode]){grid-column:1/-1}

body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-bound-mac select{appearance:auto!important;-webkit-appearance:menulist!important;cursor:pointer;padding-right:14px!important}body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-bound-mac small{font-size:12px;font-weight:400;line-height:1.6;color:#566c8b}

/* Connection cards reflect the current recorded session state. */
body.nisaat-modern.portal-shell #console #customer-profile-page .subscriber-profile-summary>div:nth-child(2):has(>b.good){background:#e8f7ee!important;border-color:#a6d9b8!important;border-top-color:#16834b!important}
body.nisaat-modern.portal-shell #console #customer-profile-page .subscriber-profile-summary>div:nth-child(2):has(>b.good)>b{color:#08783d!important}
body.nisaat-modern.portal-shell #console #customer-profile-page .subscriber-profile-summary>div:nth-child(2):has(>b.muted){background:#fff0f0!important;border-color:#edb4b4!important;border-top-color:#c43b3b!important}
body.nisaat-modern.portal-shell #console #customer-profile-page .subscriber-profile-summary>div:nth-child(2):has(>b.muted)>b{color:#ad2929!important}

body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) fieldset.network-bound-mac{display:block;border:0;margin:0;padding:0 2px;min-width:0}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-bound-mac legend{float:none;width:auto;padding:0;margin:0 0 8px;font-size:14px;font-weight:600;color:#354f76}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) [data-bound-mac-choices]{display:grid;gap:8px;max-height:250px;overflow:auto;padding:2px}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) label.network-mac-choice{display:flex!important;align-items:center!important;gap:10px!important;min-height:46px;padding:10px 12px;margin:0;border:1px solid #b9c7e0;border-radius:9px;background:#fff;cursor:pointer}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-mac-choice>input{appearance:auto!important;position:static!important;opacity:1!important;display:block!important;width:20px!important;height:20px!important;min-height:20px!important;flex:0 0 20px;margin:0!important;accent-color:#5146ce}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-choice>span{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-choice:has(input:checked){border-color:#6257ce!important;background:#eeeefe!important}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-choice:focus-within{outline:2px solid #6257ce;outline-offset:2px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-bound-mac input[type=hidden]{display:none!important}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-empty{margin:0;color:#566c8b;font-size:13px}

body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) .network-mac-addresses h4{margin:0 0 10px;font-size:14px;font-weight:600;color:#354f76}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) [name=allowed_macs][hidden]{display:none!important}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) [data-mac-address-rows]{display:grid;gap:8px;max-height:280px;overflow:auto;padding:2px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-entry{display:flex;align-items:center;gap:8px}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) button.network-mac-pick{flex:1;min-width:0;min-height:42px;padding:9px 12px!important;text-align:left!important;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:14px!important;background:#fff;border:1px solid #b9c7e0;border-radius:8px;overflow-wrap:anywhere}
body.nisaat-modern.portal-shell #console :is(#profile-settings-dialog,#add-user-form #network) button.network-mac-pick[aria-pressed=true]{background:#eeeefe!important;border-color:#6257ce!important;color:#362b96}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-remove{flex:0 0 38px;min-height:42px;padding:6px!important}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-add{display:flex;align-items:end;gap:8px;margin-top:12px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-add label{flex:1;min-width:0;display:grid;gap:6px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-add button{white-space:nowrap;min-height:42px}
body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) [data-bound-mac-display]{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#f8faff}

body.portal-shell :is(#profile-settings-dialog,#add-user-form #network) .network-mac-pick{touch-action:manipulation}
