
:root{
  --bg:#f6f8fb;
  --sidebar:#101826;
  --sidebar-hover:#182337;
  --surface:#ffffff;
  --surface-subtle:#f8fafc;
  --surface-hover:#f4f7fb;
  --border:#e2e7ee;
  --border-strong:#d2d9e3;
  --text:#172033;
  --muted:#65758b;
  --muted-2:#91a0b2;
  --blue:#2f6fed;
  --blue-hover:#255dcc;
  --blue-soft:#edf3ff;
  --green:#198c63;
  --green-soft:#eaf8f2;
  --amber:#a96c10;
  --amber-soft:#fff5df;
  --red:#c54c59;
  --red-soft:#fdefef;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 10px 28px rgba(16,24,40,.05);
  --font-sans:"Segoe UI Variable Text","Segoe UI Variable","SF Pro Text","SF Pro Display","Inter","Helvetica Neue",Arial,sans-serif;
}
body:not(.light){
  --bg:#0e131b;
  --sidebar:#0a1019;
  --sidebar-hover:#141d2a;
  --surface:#141b24;
  --surface-subtle:#101721;
  --surface-hover:#18212d;
  --border:#27313e;
  --border-strong:#364353;
  --text:#eef2f7;
  --muted:#9aa7b7;
  --muted-2:#738195;
  --blue:#6b95ff;
  --blue-hover:#81a6ff;
  --blue-soft:#17284a;
  --green:#45c99a;
  --green-soft:#102d25;
  --amber:#e2a84b;
  --amber-soft:#332811;
  --red:#e57985;
  --red-soft:#351c21;
  --shadow:none
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-sans);
  font-size:clamp(13px,.72vw,15px);
  line-height:1.5;
  letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility
}
body.modal-open{overflow:hidden}
a{text-decoration:none;color:inherit}
button,input,textarea{font:inherit}

.sidebar{
  position:fixed;left:0;top:0;bottom:0;
  width:240px;
  display:flex;flex-direction:column;
  background:var(--sidebar);
  border-right:1px solid rgba(255,255,255,.06);
  z-index:40
}
.sidebar-brand{
  height:70px;
  display:flex;align-items:center;
  padding:0 20px;
  border-bottom:1px solid rgba(255,255,255,.07)
}
.brand-lockup{display:flex;align-items:center;gap:11px}
.brand-accent{
  width:3px;height:30px;border-radius:999px;
  background:linear-gradient(180deg,#5b8cff,#2f6fed)
}
.brand-copy{display:flex;flex-direction:column}
.brand-copy strong{
  color:#fff;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:-.015em
}
.brand-copy small{margin-top:3px;color:#7e8da3;font-size:9px;font-weight:500}

.sidebar-nav{padding:18px 12px}
.nav-label{
  display:block;
  padding:0 10px 7px;
  color:#66758a;
  font-size:9px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase
}
.nav-label.nav-gap{margin-top:18px}
.sidebar-nav a{
  min-height:42px;
  display:flex;align-items:center;gap:10px;
  padding:0 10px;
  border-radius:8px;
  color:#9ba8b9;
  font-size:11px;
  font-weight:600
}
.sidebar-nav a:hover{background:var(--sidebar-hover);color:#fff}
.sidebar-nav a.active{background:#1b2b46;color:#fff}
.nav-icon{
  width:22px;height:22px;flex:0 0 22px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:6px;
  position:relative;
  opacity:.9
}
.sidebar-nav a.active .nav-icon{border-color:#3c5f9c;background:#20365b}
.icon-overview:before{
  content:"";position:absolute;left:5px;top:5px;width:4px;height:4px;border-radius:1px;background:#8291a8;
  box-shadow:7px 0 0 #8291a8,0 7px 0 #8291a8,7px 7px 0 #8291a8
}
.icon-domains:before{
  content:"";position:absolute;left:5px;top:5px;width:10px;height:2px;border-radius:2px;background:#8291a8;
  box-shadow:0 4px 0 #8291a8,0 8px 0 #8291a8
}
.icon-health:before{
  content:"";position:absolute;left:5px;top:5px;width:10px;height:10px;border:2px solid #8291a8;border-radius:50%
}
.icon-health:after{
  content:"";position:absolute;left:9px;top:2px;width:2px;height:18px;background:var(--sidebar);transform:rotate(45deg)
}
.icon-history:before{
  content:"";position:absolute;left:4px;top:5px;width:12px;height:2px;border-radius:2px;background:#8291a8;
  box-shadow:0 4px 0 #8291a8,0 8px 0 #8291a8
}
.nav-text{padding-top:1px}
.sidebar-bottom{margin-top:auto;padding:14px}
.service-state{
  display:flex;align-items:center;gap:9px;
  padding:11px 12px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  background:rgba(255,255,255,.025)
}
.service-dot{width:6px;height:6px;border-radius:50%;background:#3ccf91}
.service-state div{display:flex;flex-direction:column}
.service-state strong{font-size:9px;color:#e6ebf1;font-weight:700}
.service-state small{margin-top:2px;font-size:8px;color:#718096}

.main-shell{margin-left:240px;min-width:0}
.topbar{
  height:62px;
  display:flex;align-items:center;
  padding:0 28px;
  position:sticky;top:0;z-index:30;
  background:var(--surface);
  border-bottom:1px solid var(--border)
}
.mobile-brand{display:none;align-items:center;gap:8px}
.mobile-brand-accent{width:3px;height:24px;background:var(--blue);border-radius:99px}
.mobile-brand strong{font-size:12px}
.topbar-path{display:flex;gap:7px;align-items:center;color:var(--muted-2);font-size:9px}
.topbar-path b{font-weight:400}.topbar-path strong{color:var(--muted);font-weight:600}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.top-status{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:9px;font-weight:600}
.top-status i{width:6px;height:6px;border-radius:50%;background:var(--green)}
.icon-button{
  width:32px;height:32px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  color:var(--muted);
  cursor:pointer
}

.container{padding:34px 30px 68px}
.page-head,.detail-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:22px;
  margin-bottom:22px
}
.eyebrow{
  display:block;margin-bottom:5px;
  color:var(--muted-2);
  font-size:9px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase
}
.page-head h1,.detail-head h1{
  margin:0;
  font-size:30px;
  line-height:1.12;
  font-weight:700;
  letter-spacing:-.035em
}
.page-head p{
  max-width:760px;
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55
}
.head-actions{display:flex;gap:8px}
.button{
  min-height:36px;
  display:inline-flex;align-items:center;justify-content:center;
  padding:0 13px;
  border-radius:8px;
  border:1px solid transparent;
  font-size:10px;
  font-weight:700;
  cursor:pointer
}
.button-primary{background:var(--blue);color:#fff;border-color:var(--blue)}
.button-primary:hover{background:var(--blue-hover);border-color:var(--blue-hover)}
.button-secondary{background:var(--surface);color:var(--text);border-color:var(--border-strong)}
.button-secondary:hover{background:var(--surface-subtle)}
.compact-add{min-height:34px}

.kpi-strip,.detail-kpis{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  box-shadow:var(--shadow);
  margin-bottom:18px;
  overflow:hidden
}
.kpi-strip article,.detail-kpis article{padding:16px 18px;border-right:1px solid var(--border)}
.kpi-strip article:last-child,.detail-kpis article:last-child{border-right:0}
.kpi-strip span,.detail-kpis span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em
}
.kpi-strip strong,.detail-kpis strong{
  display:block;
  margin-top:9px;
  font-size:24px;
  line-height:1;
  font-weight:700;
  letter-spacing:-.04em
}
.kpi-strip small,.detail-kpis small{
  display:flex;align-items:center;gap:5px;
  margin-top:8px;
  color:var(--muted-2);
  font-size:8px;
  font-weight:500
}
.legend-dot{width:5px;height:5px;border-radius:50%}.legend-dot.green{background:var(--green)}.legend-dot.amber{background:var(--amber)}.legend-dot.red{background:var(--red)}
.detail-kpis{grid-template-columns:1fr 1.6fr 1.4fr 1fr}
.detail-kpis .text-value{font-size:12px;line-height:1.35;letter-spacing:-.01em}

.surface{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow);
  overflow:hidden
}
.surface+.surface{margin-top:16px}
.surface-head{
  min-height:66px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 16px;
  border-bottom:1px solid var(--border)
}
.surface-head.simple{border-bottom:0;padding-bottom:8px}
.surface-head h2{
  margin:0;
  font-size:13px;
  font-weight:700;
  letter-spacing:-.015em
}
.surface-head p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:9px;
  line-height:1.45
}
.surface-tools{display:flex;gap:8px;align-items:center}
.search-input{
  width:235px;
  display:flex;align-items:center;gap:7px;
  padding:0 10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface-subtle)
}
.search-input.small{width:195px}
.search-input input{
  width:100%;
  padding:8px 0;
  border:0;outline:0;
  background:transparent;
  color:var(--text);
  font-size:9px
}
.search-icon{
  width:12px;height:12px;position:relative;display:inline-block;flex:0 0 12px
}
.search-icon:before{
  content:"";position:absolute;left:1px;top:1px;width:7px;height:7px;border:1.5px solid var(--muted-2);border-radius:50%
}
.search-icon:after{
  content:"";position:absolute;right:0;bottom:0;width:5px;height:1.5px;background:var(--muted-2);transform:rotate(45deg);transform-origin:right center
}

.filter-row{display:flex;gap:4px;padding:10px 14px;border-bottom:1px solid var(--border)}
.filter-chip{
  border:0;border-radius:7px;
  padding:6px 9px;
  background:transparent;
  color:var(--muted);
  font-size:8px;
  font-weight:700;
  cursor:pointer
}
.filter-chip:hover{background:var(--surface-subtle);color:var(--text)}
.filter-chip.active{background:var(--blue-soft);color:var(--blue)}
.filter-chip span{margin-left:4px;opacity:.7}

.scan-progress{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface-subtle)}
.scan-progress.hidden{display:none!important}
.scan-progress-top{display:flex;justify-content:space-between;gap:12px}
.scan-progress-top>div{display:flex;flex-direction:column}
.scan-progress-top strong{font-size:9px;font-weight:700}
.scan-progress-top small,.scan-progress-top>span{color:var(--muted);font-size:8px}
.scan-track{height:4px;margin-top:8px;border-radius:999px;overflow:hidden;background:var(--border)}
.scan-track div{height:100%;width:0;background:var(--blue);transition:width .2s ease}

.table-scroll{overflow:auto}
.domain-table{width:100%;min-width:960px;border-collapse:collapse}
.domain-table th,.domain-table td{padding:12px 13px;text-align:left;border-bottom:1px solid var(--border);vertical-align:middle}
.domain-table th{
  color:var(--muted-2);
  background:var(--surface-subtle);
  font-size:7px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase
}
.domain-table tbody tr:last-child td{border-bottom:0}
.domain-table tbody tr[data-search]{cursor:pointer}
.domain-table tbody tr[data-search]:hover{background:var(--surface-hover)}
.domain-primary{display:flex;align-items:center;gap:10px}
.domain-favicon{
  width:30px;height:30px;flex:0 0 30px;
  display:flex;align-items:center;justify-content:center;
  border-radius:8px;
  background:var(--blue-soft);
  color:var(--blue);
  font-size:9px;
  font-weight:800
}
.domain-favicon.large{width:42px;height:42px;flex-basis:42px;font-size:12px}
.domain-primary>div{display:flex;flex-direction:column}
.domain-primary strong{font-size:10px;font-weight:700}
.domain-primary small{margin-top:2px;color:var(--muted-2);font-size:8px}
.issuer{max-width:240px;color:var(--muted);font-size:9px}
.state{
  display:inline-flex;align-items:center;gap:5px;
  padding:4px 7px;border-radius:999px;
  font-size:7px;font-weight:800
}
.state i{width:5px;height:5px;border-radius:50%}
.state.valid{color:var(--green);background:var(--green-soft)}.state.valid i{background:var(--green)}
.state.expired,.state.error{color:var(--red);background:var(--red-soft)}.state.expired i,.state.error i{background:var(--red)}
.state.pending,.state.invalid{color:var(--amber);background:var(--amber-soft)}.state.pending i,.state.invalid i{background:var(--amber)}
.days-left{font-size:9px}.days-left.warning{color:var(--amber);font-weight:700}
.mono-chip{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:8px}
.row-action{text-align:right!important}
.row-action a{color:var(--blue);font-size:8px;font-weight:700}

.empty-state{
  padding:38px;
  display:flex;flex-direction:column;align-items:center;text-align:center;
  color:var(--muted)
}
.empty-state.compact{padding:14px}
.empty-symbol{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:var(--blue-soft);color:var(--blue)}
.empty-state strong{margin-top:8px;color:var(--text);font-size:10px}
.empty-state span{margin-top:4px;font-size:8px}
.empty-action{margin-top:12px}

.back-link{display:inline-block;margin-bottom:14px;color:var(--muted);font-size:8px}
.domain-heading{display:flex;align-items:center;gap:11px}
.domain-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:6px;color:var(--muted);font-size:8px}
.alert{display:flex;gap:8px;margin-bottom:13px;padding:10px 12px;border-radius:8px;font-size:8px}
.alert.error{color:var(--red);background:var(--red-soft);border:1px solid rgba(191,70,83,.16)}
.detail-columns{display:grid;grid-template-columns:1.25fr .75fr;gap:14px;margin-bottom:14px}
.detail-columns .surface+.surface{margin-top:0}
.details-list{display:grid;grid-template-columns:1fr 1fr;margin:0;padding:2px 15px 14px}
.details-list>div{padding:10px 0;border-bottom:1px solid var(--border)}
.details-list>div:nth-child(odd){padding-right:16px}
.details-list>div:nth-child(even){padding-left:16px}
.details-list>div.wide{grid-column:1/-1;padding-left:0;padding-right:0}
.details-list dt{color:var(--muted-2);font-size:7px;text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.details-list dd{margin:3px 0 0;font-size:9px;font-weight:600}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.break{word-break:break-all}
.count-pill{min-width:24px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:var(--surface-subtle);color:var(--muted);font-size:8px}
.san-list{max-height:300px;overflow:auto;padding:0 15px 14px}
.san-list>div{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--border)}
.san-list>div>span{padding:2px 4px;border-radius:4px;background:var(--blue-soft);color:var(--blue);font-size:6px;font-weight:800}
.san-list code{color:var(--text);font-size:8px}
.chain-list{padding:0 15px 14px}
.chain-list article{display:grid;grid-template-columns:25px 1fr auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border)}
.chain-list article:last-child{border-bottom:0}
.chain-step{width:23px;height:23px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:var(--blue-soft);color:var(--blue);font-size:7px;font-weight:800}
.chain-body{display:flex;flex-direction:column}
.chain-type{color:var(--muted-2);font-size:6px;text-transform:uppercase;letter-spacing:.05em}
.chain-body strong{margin-top:2px;font-size:9px}
.chain-body small,.chain-list time{color:var(--muted);font-size:7px}
.activity-feed{padding:0 15px 14px}
.activity-feed>div{display:grid;grid-template-columns:7px 40px 1fr auto;gap:8px;align-items:start;padding:8px 0;border-bottom:1px solid var(--border)}
.activity-feed>div:last-child{border-bottom:0}
.activity-dot{width:5px;height:5px;border-radius:50%;margin-top:4px}.activity-dot.ok{background:var(--green)}.activity-dot.bad{background:var(--red)}
.activity-feed strong{font-size:7px}.activity-feed span,.activity-feed time{color:var(--muted);font-size:7px}

.modal-backdrop{
  position:fixed;inset:0;z-index:100;
  display:none;align-items:center;justify-content:center;
  padding:20px;
  background:rgba(15,23,36,.52);
  backdrop-filter:blur(4px)
}
.modal-backdrop.open{display:flex}
.modal-card{
  width:min(620px,100%);
  max-height:90vh;
  overflow:auto;
  border:1px solid var(--border-strong);
  border-radius:14px;
  background:var(--surface);
  box-shadow:0 28px 80px rgba(0,0,0,.24)
}
.modal-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:20px;
  padding:20px 20px 14px;
  border-bottom:1px solid var(--border)
}
.modal-head h2{margin:0;font-size:18px;letter-spacing:-.02em}
.modal-head p{margin:6px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
.modal-close{
  width:32px;height:32px;flex:0 0 32px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface-subtle);
  color:var(--muted);
  font-size:18px;
  line-height:1
}
.modal-form{padding:18px 20px 20px}
.modal-form label{display:block;margin-bottom:6px;color:var(--muted);font-size:9px;font-weight:700}
.modal-form textarea{
  width:100%;
  min-height:220px;
  resize:vertical;
  padding:12px;
  border:1px solid var(--border);
  border-radius:9px;
  outline:0;
  background:var(--surface-subtle);
  color:var(--text);
  font-size:10px;
  line-height:1.6
}
.modal-form textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}
.input-meta{display:flex;justify-content:space-between;gap:8px;margin:7px 1px 12px;color:var(--muted-2);font-size:8px}
.input-meta strong{color:var(--muted)}
.modal-note{
  display:flex;gap:9px;align-items:flex-start;
  padding:10px 11px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface-subtle)
}
.modal-note-icon{
  width:20px;height:20px;flex:0 0 20px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;
  background:var(--blue-soft);
  color:var(--blue);
  font-size:8px;
  font-weight:800
}
.modal-note p{margin:2px 0 0;color:var(--muted);font-size:8px}
.form-message{margin-top:10px;color:var(--muted);font-size:8px}
.form-message.success{color:var(--green)}.form-message.error{color:var(--red)}
.modal-actions{
  display:flex;justify-content:flex-end;gap:8px;
  margin-top:16px;padding-top:16px;
  border-top:1px solid var(--border)
}

.footer{
  padding:18px 30px 28px;
  display:flex;justify-content:space-between;gap:18px;
  color:var(--muted-2);
  font-size:8px;
  border-top:1px solid var(--border)
}

@media(max-width:1180px){
  .kpi-strip{grid-template-columns:repeat(3,1fr)}
  .kpi-strip article{border-bottom:1px solid var(--border)}
}
@media(max-width:980px){
  .sidebar{display:none}.main-shell{margin-left:0}.mobile-brand{display:flex}.topbar-path{display:none}
}
@media(max-width:760px){
  .container{padding:24px 14px 54px}.topbar{padding:0 14px}
  .page-head,.detail-head{align-items:flex-start;flex-direction:column}
  .kpi-strip,.detail-kpis{grid-template-columns:1fr 1fr}
  .detail-columns{grid-template-columns:1fr}
  .details-list{grid-template-columns:1fr}
  .details-list>div,.details-list>div:nth-child(odd),.details-list>div:nth-child(even){padding-left:0;padding-right:0}
  .details-list>div.wide{grid-column:auto}
  .surface-head{align-items:flex-start;flex-direction:column}
  .surface-tools{width:100%}
  .search-input,.search-input.small{width:100%}
  .compact-add{width:100%}
  .footer{padding:16px 14px 24px;flex-direction:column}
}
@media(max-width:480px){
  .kpi-strip,.detail-kpis{grid-template-columns:1fr}
  .page-head h1,.detail-head h1{font-size:26px}
  .top-status{display:none}
  .input-meta{flex-direction:column}
  .modal-actions{flex-direction:column-reverse}
  .modal-actions .button{width:100%}
}


/* v7 working-page additions */
.overview-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.text-link{
  color:var(--blue);
  font-size:9px;
  font-weight:700;
}
.compact-list{padding:0 16px 8px}
.compact-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 110px;
  gap:12px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid var(--border);
}
.compact-row:last-child{border-bottom:0}
.compact-row:hover .domain-primary strong{color:var(--blue)}
.compact-date{
  text-align:right;
  color:var(--muted-2);
  font-size:8px;
}
.health-strip{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:16px;
}
.health-card{
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  box-shadow:var(--shadow);
}
.health-card>span{
  display:block;
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.health-card>strong{
  display:block;
  margin-top:9px;
  font-size:25px;
}
.health-card>small{
  display:block;
  margin-top:6px;
  color:var(--muted-2);
  font-size:8px;
}
.health-card.healthy{border-top:3px solid var(--green)}
.health-card.warning{border-top:3px solid var(--amber)}
.health-card.critical{border-top:3px solid var(--red)}
.risk-badge{
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  font-size:7px;
  font-weight:800;
}
.risk-badge.healthy{color:var(--green);background:var(--green-soft)}
.risk-badge.warning{color:var(--amber);background:var(--amber-soft)}
.risk-badge.critical{color:var(--red);background:var(--red-soft)}
.mini-kpis{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:16px;
}
.mini-kpis article{
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface);
  box-shadow:var(--shadow);
}
.mini-kpis span{
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:700;
}
.mini-kpis strong{
  display:block;
  margin-top:7px;
  font-size:22px;
  letter-spacing:-.03em;
}
@media(max-width:900px){
  .overview-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
  .health-strip,.mini-kpis{grid-template-columns:1fr}
  .compact-row{grid-template-columns:minmax(0,1fr) auto}
  .compact-date{display:none}
}

.sidebar-nav a{cursor:pointer}


/* v8 responsive typography */
.page-head h1,.detail-head h1{
  font-size:clamp(26px,2vw,34px);
  font-weight:680;
  line-height:1.1;
  letter-spacing:-.035em;
}
.page-head p{
  font-size:clamp(11px,.78vw,13px);
  line-height:1.6;
}
.surface-head h2{
  font-size:clamp(13px,.9vw,15px);
  font-weight:680;
}
.surface-head p{
  font-size:clamp(8px,.62vw,10px);
}
.kpi-strip strong,.detail-kpis strong{
  font-size:clamp(22px,1.75vw,28px);
}
.domain-table{
  font-size:clamp(9px,.65vw,11px);
}
.domain-table th{
  font-size:clamp(7px,.52vw,9px);
}
.domain-primary strong{
  font-size:clamp(9px,.68vw,11px);
}
.domain-primary small,
.issuer,
.days-left{
  font-size:clamp(8px,.58vw,10px);
}
.button{
  font-size:clamp(9px,.62vw,11px);
}
.sidebar-nav a{
  font-size:clamp(10px,.68vw,12px);
}

/* v8 datatable */
.datatable-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 14px;
  border-bottom:1px solid var(--border);
  background:var(--surface);
}
.dt-search{
  width:min(360px,100%);
  height:36px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface-subtle);
}
.dt-search input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font-size:clamp(9px,.62vw,11px);
}
.dt-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.dt-size-label{
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:clamp(8px,.56vw,10px);
  font-weight:600;
}
.dt-size-label select{
  height:34px;
  padding:0 26px 0 9px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--surface);
  color:var(--text);
  font-size:clamp(8px,.56vw,10px);
  outline:0;
}
.datatable-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 14px;
  border-top:1px solid var(--border);
  background:var(--surface);
}
.datatable-footer>[data-dt-info]{
  color:var(--muted);
  font-size:clamp(8px,.56vw,10px);
}
.datatable-pagination{
  display:flex;
  align-items:center;
  gap:6px;
}
.datatable-pagination>button,
.dt-page{
  min-width:32px;
  height:32px;
  padding:0 9px;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--surface);
  color:var(--muted);
  font-size:clamp(8px,.56vw,10px);
  font-weight:650;
}
.datatable-pagination>button:hover:not(:disabled),
.dt-page:hover{
  border-color:var(--border-strong);
  background:var(--surface-subtle);
  color:var(--text);
}
.datatable-pagination>button:disabled{
  opacity:.42;
  cursor:not-allowed;
}
.dt-pages{
  display:flex;
  align-items:center;
  gap:5px;
}
.dt-page.active{
  border-color:var(--blue);
  background:var(--blue);
  color:#fff;
}

/* Better desktop proportions */
@media(min-width:1400px){
  .container{padding-left:36px;padding-right:36px}
  .domain-table th,.domain-table td{padding-top:13px;padding-bottom:13px}
}

/* Tablet */
@media(max-width:900px){
  .datatable-toolbar{
    align-items:stretch;
  }
  .dt-search{
    flex:1;
    width:auto;
  }
}

/* Mobile */
@media(max-width:640px){
  body{
    font-size:14px;
  }
  .container{
    padding-left:12px;
    padding-right:12px;
  }
  .page-head h1,.detail-head h1{
    font-size:26px;
  }
  .datatable-toolbar{
    flex-direction:column;
    align-items:stretch;
    padding:10px;
  }
  .dt-search{
    width:100%;
  }
  .dt-actions{
    justify-content:space-between;
  }
  .datatable-footer{
    flex-direction:column;
    align-items:stretch;
    padding:10px;
  }
  .datatable-pagination{
    justify-content:space-between;
    width:100%;
  }
  .dt-pages{
    max-width:150px;
    overflow:auto;
  }
  .domain-table{
    min-width:860px;
    font-size:10px;
  }
  .domain-table th,.domain-table td{
    padding:10px 11px;
  }
}

/* v9 accounts, groups, quota, and health buckets */
button:disabled,.button:disabled{opacity:.48;cursor:not-allowed}
.button-danger{background:var(--red-soft);color:var(--red);border-color:rgba(197,76,89,.22)}
.button-danger:hover{background:var(--red);color:#fff}
.icon-groups:before{content:"";position:absolute;left:5px;top:6px;width:5px;height:5px;border:1.5px solid #8291a8;border-radius:2px;box-shadow:7px 0 0 -1px var(--sidebar),7px 0 0 0 #8291a8,0 7px 0 -1px var(--sidebar),0 7px 0 0 #8291a8,7px 7px 0 -1px var(--sidebar),7px 7px 0 0 #8291a8}
.topbar-user{display:flex;flex-direction:column;text-align:right;line-height:1.2}
.topbar-user strong{font-size:9px;color:var(--text)}.topbar-user small{margin-top:2px;font-size:7px;color:var(--muted)}
.logout-form{margin:0}.logout-button{height:32px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--muted);font-size:8px;font-weight:700;cursor:pointer}.logout-button:hover{color:var(--text);background:var(--surface-subtle)}
.dashboard-health a{color:inherit}.dashboard-health .health-card{transition:transform .15s ease,border-color .15s ease}.dashboard-health .health-card:hover{transform:translateY(-1px);border-color:var(--border-strong)}
.collection-usage{display:grid;grid-template-columns:auto minmax(180px,1fr) auto;align-items:center;gap:14px;padding:13px 16px;margin-bottom:16px}.collection-usage>div:first-child{display:flex;align-items:baseline;gap:6px}.collection-usage strong{font-size:16px}.collection-usage span,.collection-usage small{font-size:8px;color:var(--muted)}.quota-track{height:7px;border-radius:99px;background:var(--surface-subtle);border:1px solid var(--border);overflow:hidden}.quota-track i{display:block;height:100%;background:var(--blue);border-radius:99px}
.health-badge{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;font-size:7px;font-weight:800;white-space:nowrap}.health-badge.good{color:var(--green);background:var(--green-soft)}.health-badge.expiring{color:var(--amber);background:var(--amber-soft)}.health-badge.expired{color:var(--red);background:var(--red-soft)}.health-badge.other{color:var(--muted);background:var(--surface-subtle)}
.group-select,.modal-select{height:34px;max-width:150px;padding:0 28px 0 9px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:8px;outline:0}.modal-select{display:block;width:100%;max-width:none;margin-bottom:14px}.optional{font-weight:500;color:var(--muted-2)}
.action-pair{white-space:nowrap}.action-pair a{margin-right:9px}.text-danger{border:0;background:transparent;color:var(--red);font-size:8px;font-weight:700;padding:0;cursor:pointer}.text-danger:hover{text-decoration:underline}
.group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}.group-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-subtle)}.group-card>div:first-child{display:flex;align-items:center;gap:10px}.group-icon{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:var(--blue-soft);color:var(--blue);font-size:13px;font-weight:800}.group-card strong{display:block;font-size:10px}.group-card small{display:block;margin-top:2px;color:var(--muted);font-size:8px}.group-actions{display:flex;gap:8px}.group-actions button{border:0;background:transparent;color:var(--blue);font-size:8px;font-weight:700;cursor:pointer}.group-actions button.text-danger{color:var(--red)}

.auth-page{min-height:100vh;background:var(--bg)}.auth-shell{min-height:100vh;display:flex;flex-direction:column}.auth-brand{height:72px;display:flex;align-items:center;gap:11px;padding:0 28px;border-bottom:1px solid var(--border);background:var(--surface)}.auth-brand>div{display:flex;flex-direction:column}.auth-brand strong{font-size:13px}.auth-brand small{margin-top:2px;color:var(--muted);font-size:8px}.auth-main{flex:1;display:flex;align-items:center;justify-content:center;padding:36px 18px}.auth-card{width:min(440px,100%);padding:26px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}.auth-card-head h1{margin:0;font-size:25px;letter-spacing:-.035em}.auth-card-head p{margin:8px 0 0;color:var(--muted);font-size:10px;line-height:1.6}.auth-form{display:grid;gap:13px;margin-top:20px}.auth-form label{display:grid;gap:6px;color:var(--muted);font-size:9px;font-weight:700}.auth-form input{width:100%;height:40px;padding:0 11px;border:1px solid var(--border);border-radius:8px;outline:0;background:var(--surface-subtle);color:var(--text);font-size:10px}.auth-form input:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}.auth-form label small{color:var(--muted-2);font-size:7px;font-weight:500}.auth-submit{width:100%;min-height:40px;margin-top:3px}.auth-alert{margin-top:16px;padding:10px 11px;border-radius:8px;font-size:9px;line-height:1.5}.auth-alert.error{color:var(--red);background:var(--red-soft)}.auth-alert.success{color:var(--green);background:var(--green-soft)}.auth-alert.info{color:var(--blue);background:var(--blue-soft)}.auth-switch{margin:18px 0 0;text-align:center;color:var(--muted);font-size:9px}.auth-switch a,.auth-links a{color:var(--blue);font-weight:700}.auth-links{display:flex;justify-content:center;gap:14px;margin-top:15px;font-size:8px}.auth-footer{padding:18px;text-align:center;color:var(--muted-2);font-size:8px}
@media(max-width:760px){.collection-usage{grid-template-columns:1fr}.group-grid{grid-template-columns:1fr}.topbar-user{display:none}}

/* v10 administrator area */
.icon-admin:before,.icon-users:before,.icon-back:before{content:"";position:absolute;left:5px;top:5px;width:10px;height:10px;border:1.5px solid #8291a8;border-radius:3px}
.icon-admin:after{content:"A";position:absolute;left:8px;top:5px;font-size:7px;font-weight:800;color:#8291a8}
.icon-users:after{content:"";position:absolute;left:7px;top:6px;width:6px;height:6px;border:1.5px solid #8291a8;border-radius:50%;box-shadow:-4px 6px 0 -2px var(--sidebar),-4px 6px 0 -1px #8291a8,4px 6px 0 -2px var(--sidebar),4px 6px 0 -1px #8291a8}
.icon-back:after{content:"←";position:absolute;left:5px;top:1px;font-size:14px;color:#8291a8}
.admin-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.admin-kpi-grid article{padding:15px 16px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:var(--shadow)}
.admin-kpi-grid span{display:block;color:var(--muted);font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.admin-kpi-grid strong{display:block;margin-top:8px;font-size:23px;letter-spacing:-.035em}
.admin-kpi-grid small{display:block;margin-top:5px;color:var(--muted);font-size:8px;line-height:1.45}
.admin-overview-grid{margin-bottom:16px}.admin-compact-row{grid-template-columns:minmax(0,1fr) auto 110px}.audit-row{grid-template-columns:minmax(0,1fr) 155px}
.admin-pill{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:0 7px;border-radius:999px;background:var(--surface-subtle);color:var(--muted);font-size:7px;font-weight:800;white-space:nowrap}
.admin-pill.ok{background:var(--green-soft);color:var(--green)}.admin-pill.warn{background:var(--amber-soft);color:var(--amber)}.admin-pill.bad{background:var(--red-soft);color:var(--red)}.admin-pill.admin{background:var(--blue-soft);color:var(--blue)}
.admin-profile{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;margin-bottom:16px}
.admin-profile-main{display:flex;align-items:center;gap:12px}.admin-avatar{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--blue-soft);color:var(--blue);font-size:17px;font-weight:800}.admin-profile-main strong{display:block;font-size:13px}.admin-profile-main span{display:block;margin-top:3px;color:var(--muted);font-size:9px}.admin-profile-main small{display:block;margin-top:5px;color:var(--muted-2);font-size:7px}.admin-status-line{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.admin-actions{margin-bottom:16px}.admin-action-buttons{display:flex;gap:8px;flex-wrap:wrap;padding:14px 16px 16px}.admin-self-note{align-self:center;color:var(--muted);font-size:8px}.admin-group-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.admin-table small{color:var(--muted);font-size:7px}.admin-meta{max-width:380px;white-space:normal;word-break:break-word;font-size:7px}
.system-check-list{display:grid}.system-check-list>div{display:grid;grid-template-columns:48px 180px minmax(0,1fr);align-items:center;gap:10px;padding:12px 16px;border-top:1px solid var(--border)}.system-check-list>div:first-child{border-top:0}.system-check-list strong{font-size:9px}.system-check-list code{overflow:auto;color:var(--muted);font-size:8px}.code-panel{margin:0 16px 10px;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface-subtle);overflow:auto}.code-panel code{font-size:9px}.system-note{margin:0;padding:0 16px 16px;color:var(--muted);font-size:9px;line-height:1.6}.system-note code{font-size:8px}
@media(max-width:1050px){.admin-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.admin-kpi-grid{grid-template-columns:1fr}.admin-profile{align-items:flex-start;flex-direction:column}.admin-status-line{justify-content:flex-start}.admin-group-grid{grid-template-columns:1fr}.system-check-list>div{grid-template-columns:44px 1fr}.system-check-list code{grid-column:1/-1}.admin-compact-row{grid-template-columns:minmax(0,1fr) auto}.admin-compact-row .compact-date{display:none}}

/* ========================================================================
   v11 responsive readability + layout polish
   ======================================================================== */
:root{
  --sidebar-width:248px;
  --content-max:1760px;
  --font-sans:Inter,"Segoe UI Variable Text","Segoe UI Variable","Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
}

html{font-size:16px}
body{
  font-size:15px;
  line-height:1.55;
  letter-spacing:0;
}
.app-shell{display:flex;min-height:100vh}
.sidebar{
  width:var(--sidebar-width);
  flex:0 0 var(--sidebar-width);
}
.main-shell{
  flex:1;
  min-width:0;
  margin-left:var(--sidebar-width);
}
.container{
  width:100%;
  max-width:var(--content-max);
  margin:0 auto;
  padding:32px 36px 56px;
}

/* Cleaner navigation */
.sidebar-brand{height:72px;padding:0 20px}
.brand-copy strong{font-size:15px;font-weight:750;letter-spacing:-.02em}
.brand-copy small{display:none}
.sidebar-nav{padding:16px 12px}
.sidebar-nav a{
  min-height:44px;
  padding:0 12px;
  border-radius:9px;
  font-size:13px;
  font-weight:650;
}
.nav-label{display:none}
.nav-divider{height:1px;margin:14px 8px;background:rgba(255,255,255,.08)}
.sidebar-bottom{display:none}
.nav-icon{width:23px;height:23px;flex-basis:23px}
.sidebar-close{display:none}

/* Top bar */
.topbar{
  height:66px;
  padding:0 32px;
}
.topbar-leading{display:flex;align-items:center;gap:12px;min-width:0}
.topbar-title{
  color:var(--text);
  font-size:14px;
  font-weight:700;
  letter-spacing:-.01em;
}
.topbar-path,.mobile-brand{display:none}
.topbar-actions{gap:10px}
.topbar-user strong{font-size:12px;font-weight:700}
.topbar-user small{display:none}
.icon-button{width:36px;height:36px;font-size:15px}
.logout-button{height:36px;padding:0 12px;font-size:12px}
.mobile-menu-button{
  display:none;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--surface);
  cursor:pointer;
}
.mobile-menu-button span{display:block;width:16px;height:2px;margin:3px auto;border-radius:99px;background:var(--text)}
.sidebar-overlay{display:none}

/* Page titles */
.page-head,.detail-head{
  margin-bottom:22px;
  align-items:center;
}
.eyebrow{display:none}
.page-head h1,.detail-head h1{
  font-size:32px;
  line-height:1.15;
  font-weight:750;
  letter-spacing:-.035em;
}
.page-head p{
  max-width:760px;
  margin-top:7px;
  font-size:14px;
  line-height:1.55;
}
.head-actions{gap:10px}
.button{
  min-height:40px;
  padding:0 15px;
  border-radius:9px;
  font-size:13px;
  font-weight:700;
}

/* Surfaces */
.surface{border-radius:14px}
.surface+.surface{margin-top:18px}
.surface-head{
  min-height:62px;
  padding:15px 18px;
}
.surface-head.simple{padding:15px 18px 7px}
.surface-head h2{font-size:15px;font-weight:750}
.surface-head p{margin-top:4px;font-size:12px;line-height:1.5}
.text-link{font-size:12px}

/* Dashboard cards */
.health-strip{gap:14px;margin-bottom:18px}
.health-card{padding:19px 20px;border-radius:13px}
.health-card>span{font-size:12px;letter-spacing:.035em}
.health-card>strong{margin-top:10px;font-size:30px;line-height:1}
.health-card>small{margin-top:8px;font-size:12px}
.admin-kpi-grid{gap:14px;margin-bottom:18px}
.admin-kpi-grid article{padding:18px;border-radius:12px}
.admin-kpi-grid span{font-size:11px}
.admin-kpi-grid strong{margin-top:8px;font-size:28px}
.admin-kpi-grid small{margin-top:6px;font-size:11.5px}
.mini-kpis article{padding:17px 18px}
.mini-kpis span{font-size:12px}
.mini-kpis strong{font-size:27px}
.collection-usage{padding:16px 18px;gap:16px}
.collection-usage strong{font-size:18px}
.collection-usage span,.collection-usage small{font-size:12px}

/* Tables */
.table-scroll{overflow:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.domain-table{
  min-width:980px;
  font-size:13px;
}
.domain-table th,.domain-table td{padding:14px 16px}
.domain-table th{
  font-size:10.5px;
  letter-spacing:.055em;
}
.domain-primary{gap:11px}
.domain-favicon{width:34px;height:34px;flex-basis:34px;border-radius:9px;font-size:11px}
.domain-primary strong{font-size:13px}
.domain-primary small{margin-top:2px;font-size:11.5px}
.issuer{max-width:300px;font-size:12.5px}
.days-left{font-size:12.5px}
.state,.health-badge,.admin-pill,.risk-badge{
  min-height:25px;
  padding:4px 8px;
  font-size:10.5px;
}
.row-action a,.text-danger{font-size:12px}
.mono-chip,.mono{font-size:11px}
.group-select,.modal-select{height:38px;font-size:12px}

/* Data-table controls */
.datatable-toolbar{padding:12px 16px;gap:14px}
.dt-search{width:min(390px,100%);height:40px;padding:0 12px}
.dt-search input{font-size:13px}
.dt-size-label{font-size:12px}
.dt-size-label select{height:38px;font-size:12px}
.filter-row{gap:6px;padding:10px 16px;overflow-x:auto}
.filter-chip{padding:7px 10px;font-size:11px;white-space:nowrap}
.datatable-footer{padding:12px 16px}
.datatable-footer>[data-dt-info],.datatable-pagination>button,.dt-page{font-size:11.5px}
.datatable-pagination>button,.dt-page{height:34px;min-width:34px}

/* Lists / details */
.compact-list{padding:0 18px 9px}
.compact-row{padding:13px 0;gap:14px}
.compact-date{font-size:11px}
.empty-state{padding:44px 24px}
.empty-state strong{font-size:14px}
.empty-state span{font-size:12px}
.back-link{font-size:12px}
.domain-meta{font-size:12px}
.details-list dt{font-size:10px}
.details-list dd{font-size:13px}
.count-pill{font-size:11px}
.san-list code{font-size:12px}
.chain-body strong{font-size:13px}
.chain-body small,.chain-list time,.activity-feed strong,.activity-feed span,.activity-feed time{font-size:11px}

/* Groups */
.group-grid{gap:14px;padding:18px}
.group-card{padding:16px;border-radius:11px}
.group-icon{width:36px;height:36px;font-size:14px}
.group-card strong{font-size:13px}
.group-card small{font-size:11px}
.group-actions button{font-size:12px}

/* Admin profile */
.admin-profile{padding:18px}
.admin-avatar{width:48px;height:48px;font-size:18px}
.admin-profile-main strong{font-size:15px}
.admin-profile-main span{font-size:12px}
.admin-profile-main small{font-size:11px}
.admin-self-note{font-size:11.5px}
.admin-table small{font-size:11px}
.admin-meta{font-size:11px}
.system-check-list>div{grid-template-columns:56px 190px minmax(0,1fr);padding:14px 18px}
.system-check-list strong{font-size:12px}
.system-check-list code{font-size:11px}
.code-panel code,.system-note,.system-note code{font-size:12px}

/* Auth */
.auth-brand strong{font-size:15px}
.auth-brand small{display:none}
.auth-card{width:min(470px,100%);padding:30px}
.auth-card-head h1{font-size:28px}
.auth-card-head p{font-size:13px}
.auth-form{gap:15px}
.auth-form label{font-size:12px}
.auth-form input{height:44px;font-size:14px}
.auth-form label small{font-size:11px}
.auth-alert,.auth-switch,.auth-links{font-size:12px}
.auth-footer{display:none}

/* No redundant app footer in v11 */
.footer{display:none}

/* Wide desktop: use the canvas without making text tiny */
@media (min-width:1600px){
  :root{--sidebar-width:252px;--content-max:1840px}
  body{font-size:16px}
  .container{padding:38px 42px 64px}
  .topbar{padding:0 40px}
  .page-head h1,.detail-head h1{font-size:34px}
  .domain-table{font-size:13.5px}
  .domain-table th{font-size:11px}
  .domain-primary strong{font-size:13.5px}
  .domain-primary small,.issuer{font-size:12.5px}
}

/* 13-inch / medium laptop */
@media (max-width:1366px){
  :root{--sidebar-width:228px}
  .container{max-width:none;padding:28px 26px 48px}
  .topbar{padding:0 26px}
  .sidebar-nav a{font-size:12.5px;padding:0 10px}
  .page-head h1,.detail-head h1{font-size:30px}
  .admin-users-table{min-width:860px}
}

/* Tablet + small laptop: off-canvas navigation */
@media (max-width:1024px){
  :root{--sidebar-width:270px}
  body.nav-open{overflow:hidden}
  .main-shell{margin-left:0}
  .sidebar{
    display:flex;
    width:var(--sidebar-width);
    flex-basis:var(--sidebar-width);
    transform:translateX(-105%);
    transition:transform .22s ease;
    box-shadow:0 18px 50px rgba(0,0,0,.25);
    z-index:120;
  }
  .sidebar.is-open{transform:translateX(0)}
  .sidebar-overlay{
    position:fixed;
    inset:0;
    display:block;
    pointer-events:none;
    opacity:0;
    background:rgba(10,16,25,.45);
    transition:opacity .2s ease;
    z-index:110;
  }
  .sidebar-overlay.is-open{opacity:1;pointer-events:auto}
  .mobile-menu-button{display:block}
  .sidebar-close{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-left:auto;
    width:34px;
    height:34px;
    border:0;
    background:transparent;
    color:#9ba8b9;
    font-size:25px;
    cursor:pointer;
  }
  .container{padding:26px 22px 44px}
  .topbar{padding:0 22px}
  .topbar-user{display:flex}
  .admin-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:760px){
  body{font-size:14px}
  .topbar{height:60px;padding:0 14px}
  .container{padding:22px 14px 38px}
  .page-head,.detail-head{align-items:flex-start;gap:14px;margin-bottom:18px}
  .page-head h1,.detail-head h1{font-size:27px}
  .page-head p{font-size:13px}
  .head-actions{width:100%;flex-wrap:wrap}
  .head-actions .button{flex:1;min-width:130px}
  .health-strip,.mini-kpis,.admin-kpi-grid{grid-template-columns:1fr}
  .overview-grid{grid-template-columns:1fr}
  .surface-head{padding:14px 15px}
  .surface-head h2{font-size:14px}
  .surface-head p{font-size:11.5px}
  .datatable-toolbar{padding:10px;flex-direction:column;align-items:stretch}
  .dt-search{width:100%}
  .dt-actions{justify-content:flex-end}
  .datatable-footer{padding:10px;flex-direction:column;align-items:stretch}
  .datatable-pagination{justify-content:space-between}
  .filter-row{padding:9px 10px}
  .topbar-user{display:none}
  .logout-button{padding:0 10px}
  .icon-button{width:34px;height:34px}
  .group-grid{grid-template-columns:1fr;padding:12px}
  .collection-usage{grid-template-columns:1fr;gap:10px}
}

/* Admin/user tables become readable cards on phones instead of tiny horizontal text */
@media (max-width:680px){
  .mobile-card-table{min-width:0!important;width:100%}
  .mobile-card-table thead{display:none}
  .mobile-card-table tbody,.mobile-card-table tr,.mobile-card-table td{display:block;width:100%}
  .mobile-card-table tbody tr[data-search]{
    margin:0;
    padding:14px 14px 12px;
    border-bottom:1px solid var(--border);
    background:var(--surface);
  }
  .mobile-card-table tbody tr[data-search]:last-child{border-bottom:0}
  .mobile-card-table td{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:36px;
    padding:6px 0;
    border:0!important;
    text-align:right;
    font-size:12.5px;
  }
  .mobile-card-table td::before{
    content:attr(data-label);
    flex:0 0 auto;
    color:var(--muted);
    font-size:10.5px;
    font-weight:750;
    letter-spacing:.035em;
    text-transform:uppercase;
    text-align:left;
  }
  .mobile-card-table td.mobile-primary{
    display:block;
    padding:0 0 10px;
    text-align:left;
  }
  .mobile-card-table td.mobile-primary::before{display:none}
  .mobile-card-table .domain-primary{align-items:center}
  .mobile-card-table .row-action{padding-top:10px;text-align:left!important}
  .mobile-card-table .row-action::before{display:none}
  .mobile-card-table .row-action a,
  .mobile-card-table .row-action button{
    width:100%;
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--surface-subtle);
  }
  .mobile-card-table .action-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .mobile-card-table .action-pair a{margin:0}
  .mobile-card-table td[colspan]{display:block;text-align:center}
  .mobile-card-table td[colspan]::before{display:none}
}

@media (max-width:420px){
  .topbar-title{font-size:13px}
  .logout-button{font-size:11px}
  .page-head h1,.detail-head h1{font-size:25px}
  .button{font-size:12.5px}
  .health-card{padding:17px}
  .health-card>strong{font-size:28px}
  .modal-backdrop{padding:10px}
  .modal-head{padding:16px 16px 12px}
  .modal-form{padding:15px 16px 16px}
}

/* Desktop top bar stays intentionally minimal; title appears when navigation becomes mobile. */
.topbar-title{display:none}
@media(max-width:1024px){.topbar-title{display:block}}

/* Readable modal and scanner feedback text */
.modal-head h2{font-size:20px}
.modal-head p{font-size:13px}
.modal-form label{font-size:12px}
.modal-form textarea{font-size:14px;line-height:1.55}
.input-meta{font-size:11px}
.modal-note p,.form-message{font-size:12px}
.scan-progress-top strong{font-size:12px}
.scan-progress-top small,.scan-progress-top>span{font-size:11px}
.alert{font-size:12px}
