
.security-hero,.security-page-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px
}
.security-hero{
  padding:24px 26px;border-radius:20px;color:#fff;
  background:linear-gradient(125deg,#253b80,#4267f4 60%,#7b4df4);
  box-shadow:0 16px 34px rgba(44,70,160,.18)
}
.security-hero h2{margin:4px 0 6px;color:#fff;font-size:2rem}
.security-hero p{margin:0;color:rgba(255,255,255,.84)}
.security-kicker{font-size:.72rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase;color:#78869d}
.security-hero .security-kicker{color:rgba(255,255,255,.72)}
.security-page-head h2{margin:4px 0 5px;color:#102348}
.security-page-head p{margin:0;color:#66748a}
.security-back{display:block;margin-bottom:16px;color:#4166f5;text-decoration:none;font-weight:800}
.security-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;
  padding:10px 14px;border:0;border-radius:11px;text-decoration:none;font-weight:850;cursor:pointer
}
.security-btn-primary{background:linear-gradient(135deg,#4166f5,#7b4df4);color:#fff}
.security-btn-light{background:#eef2f8;color:#334662}
.security-hero .security-btn-light{background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.28)}
.security-explainer{
  display:flex;align-items:center;justify-content:center;gap:16px;padding:16px;margin-bottom:18px;
  border:1px solid #e0e6ef;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(30,49,83,.05)
}
.security-explainer>div{display:flex;align-items:center;gap:10px}
.security-explainer>div>strong{
  width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#eef2ff;color:#4166f5
}
.security-explainer b,.security-explainer small{display:block}
.security-explainer small{color:#748197;margin-top:2px}
.security-explainer>i{font-style:normal;color:#9aa5b5}
.security-tabs{display:flex;gap:8px;margin-bottom:16px}
.security-tabs button{
  padding:10px 16px;border:1px solid #dfe5ef;border-radius:11px;background:#fff;color:#526078;font-weight:850;cursor:pointer
}
.security-tabs button.is-active{background:#102348;border-color:#102348;color:#fff}
.security-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.security-card{
  padding:17px;border:1px solid #e1e7f0;border-radius:16px;background:#fff;
  box-shadow:0 10px 26px rgba(30,49,83,.06)
}
.security-card header{display:flex;align-items:center;gap:11px}
.security-card-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:12px;background:#eef2ff}
.security-card header>div{flex:1;min-width:0}
.security-card header strong,.security-card header small{display:block}
.security-card header small{color:#758198;margin-top:2px}
.security-status{padding:5px 8px;border-radius:999px;font-size:.72rem;font-weight:850}
.security-status.is-on{background:#eaf8f1;color:#15734b}
.security-status.is-off{background:#f3f5f8;color:#7c8798}
.security-metrics{display:flex;gap:18px;margin:17px 0;color:#6d7990}
.security-metrics b{color:#102348}
.security-card footer{padding-top:13px;border-top:1px solid #edf0f5}
.security-card footer a{color:#4166f5;text-decoration:none;font-weight:850}
.security-toolbar,.security-form-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:13px 15px;margin-bottom:15px;border:1px solid #e0e6ef;border-radius:14px;background:#fff
}
.security-toolbar label,.security-form-toolbar label{
  display:flex;align-items:center;gap:8px;flex:1;max-width:520px
}
.security-toolbar input,.security-form-toolbar input{
  width:100%;padding:10px 11px;border:1px solid #dfe5ef;border-radius:10px;background:#f8faff
}
.security-user-list{display:grid;gap:9px}
.security-user-list>a{
  display:grid;grid-template-columns:auto 1.1fr 1fr auto auto;align-items:center;gap:13px;
  padding:13px 15px;border:1px solid #e1e7f0;border-radius:14px;background:#fff;color:#102348;
  text-decoration:none;box-shadow:0 7px 20px rgba(30,49,83,.045)
}
.security-avatar{
  width:42px;height:42px;display:grid;place-items:center;border-radius:50%;
  background:linear-gradient(135deg,#eaf0ff,#f3eaff);color:#4166f5;font-weight:900
}
.security-user-list strong,.security-user-list small{display:block}
.security-user-list small{margin-top:2px;color:#718096}
.security-role-label{color:#53627a}
.security-override-count{padding:6px 9px;border-radius:999px;background:#f0f3f8;color:#68758a;font-size:.78rem}
.security-code{padding:8px 11px;border-radius:9px;background:#eef2ff;color:#4166f5;font-weight:900}
.security-priority-note{
  display:flex;gap:10px;padding:13px 15px;margin-bottom:15px;border:1px solid #cbd6ff;
  border-radius:13px;background:#f3f6ff;color:#344a88
}
.security-priority-note strong{white-space:nowrap}
.security-modules{display:grid;gap:14px}
.security-module{
  border:1px solid #e0e6ef;border-radius:16px;background:#fff;overflow:hidden;
  box-shadow:0 8px 24px rgba(30,49,83,.045)
}
.security-module>header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:#f8faff;border-bottom:1px solid #e7ebf2
}
.security-module>header strong,.security-module>header small{display:block}
.security-module>header small{margin-top:2px;color:#7b879a}
.security-module>header button{border:0;background:transparent;color:#4166f5;font-weight:850;cursor:pointer}
.security-permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}
.security-permission-row{
  display:flex;align-items:flex-start;gap:10px;padding:13px 15px;border-right:1px solid #edf0f5;border-bottom:1px solid #edf0f5;cursor:pointer
}
.security-permission-row:hover{background:#fbfcff}
.security-permission-row input{width:18px;height:18px;margin-top:2px}
.security-permission-row strong,.security-permission-row small{display:block}
.security-permission-row small{margin-top:3px;color:#7b8799;font-size:.75rem}
.security-user-permissions{display:grid}
.security-user-permission{
  display:grid;grid-template-columns:minmax(220px,1fr) auto 190px;align-items:center;gap:16px;
  padding:12px 15px;border-bottom:1px solid #edf0f5
}
.security-user-permission:last-child{border-bottom:0}
.security-permission-name strong,.security-permission-name small{display:block}
.security-permission-name small{margin-top:3px;color:#7b8799}
.security-segmented{display:flex;padding:3px;border-radius:10px;background:#f0f3f8}
.security-segmented label{cursor:pointer}
.security-segmented input{position:absolute;opacity:0;pointer-events:none}
.security-segmented span{display:block;padding:7px 9px;border-radius:8px;font-size:.76rem;font-weight:800;color:#68758a}
.security-segmented input:checked+span{background:#fff;color:#102348;box-shadow:0 2px 8px rgba(30,49,83,.1)}
.security-segmented label:nth-child(2) input:checked+span{color:#15734b;background:#eaf8f1}
.security-segmented label:nth-child(3) input:checked+span{color:#a53c49;background:#fff0f2}
.security-user-permission select{padding:9px 10px;border:1px solid #dce3ed;border-radius:9px;background:#fff}
.security-sticky-actions{
  position:sticky;bottom:12px;display:flex;justify-content:flex-end;gap:10px;margin-top:18px;padding:12px;
  border:1px solid #dfe5ef;border-radius:14px;background:rgba(255,255,255,.95);box-shadow:0 12px 30px rgba(22,39,72,.12);backdrop-filter:blur(8px)
}
.security-legend{display:flex;flex-wrap:wrap;gap:7px}
.security-legend span{padding:6px 9px;border-radius:999px;font-size:.75rem;font-weight:800}
.security-legend .is-inherited{background:#f0f3f8;color:#68758a}
.security-legend .is-allowed{background:#eaf8f1;color:#15734b}
.security-legend .is-denied{background:#fff0f2;color:#a53c49}
.security-audit-table{border:1px solid #e0e6ef;border-radius:16px;background:#fff;overflow:auto}
.security-audit-table table{width:100%;border-collapse:collapse}
.security-audit-table th,.security-audit-table td{padding:12px 13px;border-bottom:1px solid #edf0f5;text-align:left;vertical-align:top}
.security-audit-table th{background:#f8faff;color:#67758b;font-size:.75rem;text-transform:uppercase;letter-spacing:.05em}
.security-audit-action{padding:5px 8px;border-radius:8px;background:#eef2ff;color:#4166f5;font-size:.76rem;font-weight:800}
.security-json-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.security-json-grid pre{max-width:420px;overflow:auto;padding:9px;border-radius:8px;background:#111b31;color:#dbe5ff;font-size:.72rem}
.security-empty{text-align:center;padding:40px}
.security-empty span{display:block;font-size:2rem;margin-bottom:8px}
@media(max-width:1100px){
  .security-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .security-permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .security-user-permission{grid-template-columns:1fr}
}
@media(max-width:760px){
  .security-hero,.security-page-head{align-items:stretch;flex-direction:column}
  .security-explainer{align-items:stretch;flex-direction:column}
  .security-explainer>i{display:none}
  .security-grid,.security-permission-grid{grid-template-columns:1fr}
  .security-toolbar,.security-form-toolbar{align-items:stretch;flex-direction:column}
  .security-toolbar label,.security-form-toolbar label{max-width:none}
  .security-user-list>a{grid-template-columns:auto 1fr auto}
  .security-role-label,.security-override-count{grid-column:2/4}
  .security-sticky-actions{flex-direction:column-reverse}
  .security-sticky-actions .security-btn{width:100%}
  .security-json-grid{grid-template-columns:1fr}
}
.security-effective-summary{margin:20px 0;padding:22px;border:1px solid #dbe4f0;border-radius:20px;background:#fff;box-shadow:0 10px 28px rgba(25,45,80,.06)}
.security-effective-summary>header{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px}
.security-effective-summary h3{margin:4px 0 0;color:#17223b}
.security-effective-summary header small{color:#667085}
.security-space-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.security-space-grid article{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:14px;border-radius:14px;border:1px solid #e5e9f1;background:#f8fafc}
.security-space-grid article>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;font-weight:800}
.security-space-grid article div{display:flex;flex-direction:column;gap:3px}
.security-space-grid article small{color:#667085;line-height:1.3}
.security-space-grid article>b{grid-column:1/-1;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em}
.security-space-grid article.is-allowed{border-color:#a7e7ca;background:#effcf6}
.security-space-grid article.is-allowed>span{background:#d6f6e7;color:#087443}
.security-space-grid article.is-allowed>b{color:#087443}
.security-space-grid article.is-denied>span{background:#eceff4;color:#697386}
.security-space-grid article.is-denied>b{color:#697386}
.security-effective-badge{display:inline-flex!important;width:max-content;margin-top:5px;padding:3px 8px;border-radius:999px;font-size:.68rem!important;font-weight:800;text-transform:uppercase}
.security-effective-badge.is-on{background:#d6f6e7;color:#087443}
.security-effective-badge.is-off{background:#fee4e2;color:#b42318}
.security-lock-note{margin:14px 0;padding:14px 18px;border-radius:12px;background:#fff7e6;border:1px solid #f4d28b;color:#7a4d00;font-weight:700}
@media(max-width:1050px){.security-space-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.security-effective-summary>header{align-items:start;flex-direction:column}.security-space-grid{grid-template-columns:1fr}}
