/* Sprint 27 — Perfis, Permissões & Segregação de Acesso */
.service-access-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px
}
.service-access-kpis article{
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  padding:15px 16px;
  display:grid;
  gap:5px
}
.service-access-kpis span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.07em;
  color:var(--muted)
}
.service-access-kpis b{font-size:23px;line-height:1.1}
.service-access-kpis small{color:var(--muted)}
.service-access-section{padding:16px;margin-bottom:14px}
.service-access-profiles{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:12px
}
.service-access-profile-card{
  border:1px solid var(--line);
  border-radius:13px;
  padding:13px;
  background:var(--panel2);
  display:grid;
  gap:8px
}
.service-access-profile-card.current{
  border-color:var(--green);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--green) 18%,transparent)
}
.service-access-profile-head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center
}
.service-access-profile-head>span{font-size:14px;font-weight:800}
.service-access-profile-head>b{
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.06em;
  background:#e7f8ef;
  color:#08794d;
  border:1px solid #bde8d3;
  border-radius:999px;
  padding:4px 7px
}
.service-access-profile-card p{
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.45
}
.service-access-profile-tags{display:flex;gap:5px;flex-wrap:wrap}
.service-access-profile-tags span{
  font-size:8px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px 7px;
  background:var(--panel)
}
.service-access-members td:first-child{
  min-width:190px
}
.service-access-members td:first-child b,
.service-access-members td:first-child small{
  display:block
}
.service-access-members td:first-child small{
  color:var(--muted);
  margin-top:3px;
  font-size:10px
}
.service-access-profile-pill{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 8px;
  font-size:9px;
  font-weight:800
}
.service-access-profile-pill.admin{background:#e7f8ef;color:#08794d;border-color:#bde8d3}
.service-access-profile-pill.manager{background:#eef5ff;color:#2d5f91;border-color:#cfdef2}
.service-access-profile-pill.agent{background:#f2f7f4;color:#456655}
.service-access-profile-pill.procurement{background:#fff7df;color:#8f6508;border-color:#ead7a0}
.service-access-profile-pill.finance{background:#f5efff;color:#6b43a0;border-color:#ded0f1}
.service-access-profile-pill.viewer{background:#f4f4f4;color:#606060}
.service-access-source{
  display:inline-flex;
  margin-left:5px;
  color:var(--muted);
  font-size:8px
}
.service-access-source.explicit{color:var(--green)}
.service-access-member-action{
  display:flex;
  gap:7px;
  align-items:center;
  min-width:290px
}
.service-access-member-action .input{min-width:175px}
.service-access-lock{
  color:var(--muted);
  font-size:10px
}
.service-access-matrix-wrap{margin-top:12px}
.service-access-matrix th:not(:first-child),
.service-access-matrix td:not(:first-child){text-align:center}
.service-access-matrix td:first-child{min-width:180px}
.service-access-mode{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:68px;
  padding:5px 7px;
  border-radius:999px;
  font-size:8px;
  font-weight:800;
  border:1px solid var(--line)
}
.service-access-mode.manage{background:#e7f8ef;color:#08794d;border-color:#bde8d3}
.service-access-mode.read{background:#eef5ff;color:#3f6283;border-color:#cfdef2}
.service-access-mode.none{background:var(--panel2);color:var(--muted)}
.service-access-security{
  border-left:4px solid var(--green);
  padding:16px 18px
}
.service-access-security h3{margin:2px 0 4px}
.service-access-security p{margin:0;color:var(--muted)}
.service-access-denied{
  text-align:center;
  display:grid;
  justify-items:center;
  gap:8px;
  padding:38px
}
.service-access-denied-icon{
  width:52px;height:52px;border:1px solid var(--line);
  border-radius:50%;display:grid;place-items:center;
  font-size:23px
}
.service-access-denied p{color:var(--muted);max-width:560px}

.service-access-preview-btn{justify-self:start;margin-top:2px}
.service-access-preview-backdrop{
  position:fixed;inset:0;z-index:1200;background:rgba(3,17,10,.62);
  display:grid;place-items:center;padding:22px
}
.service-access-preview-modal{
  width:min(920px,96vw);max-height:88vh;overflow:auto;
  border:1px solid var(--line);border-radius:18px;background:var(--panel);
  box-shadow:0 24px 80px rgba(0,0,0,.28);padding:20px
}
.service-access-preview-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px
}
.service-access-preview-head h3{font-size:24px;margin:3px 0 4px}
.service-access-preview-head p{margin:0;color:var(--muted)}
.service-access-preview-note{
  display:flex;gap:8px;align-items:center;margin:16px 0;padding:11px 12px;
  border:1px solid #bde8d3;background:#e7f8ef;color:#08794d;border-radius:12px
}
.service-access-preview-grid{
  display:grid;grid-template-columns:.85fr 1.15fr;gap:14px
}
.service-access-preview-grid section{
  border:1px solid var(--line);border-radius:14px;background:var(--panel2);padding:14px
}
.service-access-preview-grid h4{margin:0 0 11px}
.service-access-preview-chips{display:flex;flex-wrap:wrap;gap:7px}
.service-access-preview-chips span{
  border:1px solid var(--line);border-radius:999px;padding:6px 9px;background:var(--panel);font-size:10px
}
.service-access-preview-list{display:grid}
.service-access-preview-list>div{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:9px 0;border-bottom:1px solid var(--line)
}
.service-access-preview-list>div:last-child{border-bottom:0}
.service-access-preview-list b{
  min-width:74px;text-align:center;border-radius:999px;padding:5px 8px;
  font-size:9px;border:1px solid var(--line)
}
.service-access-preview-list b.manage{background:#e7f8ef;color:#08794d;border-color:#bde8d3}
.service-access-preview-list b.read{background:#eef5ff;color:#3f6283;border-color:#cfdef2}
.service-access-preview-list b.none{background:var(--panel);color:var(--muted)}
@media(max-width:720px){
  .service-access-preview-grid{grid-template-columns:1fr}
  .service-access-preview-head{display:grid}
}

@media(max-width:1100px){
  .service-access-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-access-profiles{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .service-access-kpis,
  .service-access-profiles{grid-template-columns:1fr}
  .service-access-member-action{min-width:0;display:grid}
}
