:root{
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --accent:#4f46e5;
  --cyan:#0891b2;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --radius:14px;
  --green:#10b981;
  --orange:#f59e0b;
  --red:#ef4444;
  --ease-out:cubic-bezier(0.16, 1, 0.3, 1);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:80px}
body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  font:14px/1.6 "Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:#0f172a url("background.webp") center top/cover no-repeat;
  position:relative;
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at 15% 10%, rgba(79,70,229,.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(6,182,212,.18) 0%, transparent 45%),
    linear-gradient(180deg, rgba(15,23,42,.35) 0%, rgba(15,23,42,.55) 100%);
}

@keyframes cardReveal{
  from{opacity:0;transform:translate3d(0,10px,0)}
  to{opacity:1;transform:translate3d(0,0,0)}
}
@keyframes spinRing{
  to{transform:rotate(360deg)}
}

button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
a{color:var(--blue);text-decoration:none;transition:color .15s ease}
a:hover{color:var(--blue-dark)}
button{cursor:pointer}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}
[hidden]{display:none!important}
.hp-trap{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.icon{display:inline-block;vertical-align:middle;flex-shrink:0}

.topbar{
  height:62px;
  background:linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color:white;
  border-bottom:1px solid rgba(255,255,255,.14);
  box-shadow:0 4px 18px rgba(15,23,42,.22);
  position:sticky;
  top:0;
  z-index:50;
}
.nav-container{height:100%;max-width:1200px;margin:auto;padding:0 24px;display:flex;align-items:center;gap:32px}
.brand{
  color:white;
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  font-size:20px;
  font-weight:700;
  letter-spacing:.3px;
}
.brand:hover{color:white}
.brand>.icon{width:24px;height:24px}
.brand strong{
  font-size:11px;
  font-weight:700;
  padding:3px 8px;
  margin-left:4px;
  vertical-align:2px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.42);
  border-radius:999px;
  letter-spacing:1.5px;
}
.brand-caption{margin-left:auto;color:#dbeafe;font-size:13px;font-weight:500}
.main-nav{height:100%;display:flex;align-items:stretch;gap:4px}
.main-nav a{
  color:#dbeafe;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  font-size:13px;
  font-weight:500;
  position:relative;
  transition:color .15s ease, background-color .15s ease;
}
.main-nav a:hover,.main-nav a.current{color:white;background:rgba(255,255,255,.1)}
.main-nav a.current::after{
  content:"";
  position:absolute;
  bottom:0;
  height:3px;
  left:12px;
  right:12px;
  background:linear-gradient(90deg,#38bdf8,#818cf8);
  border-radius:3px 3px 0 0;
}
.main-nav .icon{width:17px;height:17px}
.nav-account{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:13px;white-space:nowrap}
.avatar{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.4);
  border-radius:50%;
  font-weight:700;
}
.nav-account form{display:flex;margin-left:4px}
.nav-logout,.nav-toggle{
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  color:#fff;
  padding:8px;
  border-radius:8px;
  transition:background-color .15s ease;
}
.nav-logout:hover,.nav-toggle:hover{background:rgba(255,255,255,.18)}
.nav-toggle{display:none}

.glass{
  background:rgba(248,250,252,.96);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:0 14px 36px rgba(15,23,42,.22);
  border-radius:calc(var(--radius) + 4px);
}
.auth-shell{
  width:calc(100% - 48px);
  max-width:1140px;
  min-height:648px;
  margin:28px auto 42px;
  display:grid;
  place-items:center;
  padding:52px 24px;
}
.auth-container{width:100%;max-width:410px}
.keygate-container{max-width:460px}

.alert{
  padding:13px 16px;
  margin:0 0 18px;
  border:1px solid transparent;
  border-radius:10px;
  line-height:1.6;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  overflow-wrap:anywhere;
  transition:opacity .15s ease, transform .15s ease;
}
.alert>span{display:flex;align-items:center;gap:9px}
.welcome{color:#1e293b;background:#f1f5f9;border-color:#cbd5e1;font-size:14px}
.error{background:#fff1f2;border-color:#fecdd3;color:#be123c}
.success{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.icon-button{border:0;padding:4px;background:transparent;color:inherit;display:grid;place-items:center;opacity:.65;border-radius:6px}
.icon-button:hover{opacity:1;background:rgba(15,23,42,.06)}

.card{
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  margin-bottom:20px;
  box-shadow:0 2px 10px rgba(15,23,42,.04);
  overflow:hidden;
  animation:cardReveal .24s var(--ease-out) both;
}
.card-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:18px 24px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,#f8fafc,#ffffff);
}
.card-heading h1,.card-heading h2{font-size:16px;font-weight:700;margin:0;display:flex;align-items:center;gap:9px;letter-spacing:-.2px}
.card-heading h2>.icon{color:var(--blue);width:19px;height:19px}
.card-heading p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.card-body{padding:24px}

.auth-card{
  border-radius:16px;
  box-shadow:0 10px 28px rgba(15,23,42,.1);
  margin-bottom:0;
  border:1px solid #dbeafe;
}
.auth-card .card-heading{
  background:linear-gradient(135deg,#f8fafc 0%,#eff6ff 100%);
  padding:18px 22px;
}
.auth-card h1{font-size:19px;font-weight:700;color:#0f172a;letter-spacing:-.3px}
.auth-card .card-body{padding:22px 22px 26px}

.stack-form{display:flex;flex-direction:column;align-items:stretch}
label{font-size:13px;color:#334155;font-weight:600;display:block;margin-bottom:7px}
input,select{
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:9px;
  color:var(--ink);
  width:100%;
  height:42px;
  padding:9px 13px;
  transition:border-color .15s ease, box-shadow .15s ease;
  min-width:0;
}
input::placeholder{color:#94a3b8;font-size:13px}
input:focus,select:focus{
  border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(37,99,235,.14);
  outline:none;
}
.stack-form>input,.stack-form>.password-field{margin-bottom:18px}
.password-field{position:relative;display:flex}
.password-field input{padding-right:44px}
.password-toggle{
  display:grid;
  place-items:center;
  position:absolute;
  right:3px;
  top:3px;
  width:36px;
  height:36px;
  background:transparent;
  border:0;
  color:#64748b;
  border-radius:7px;
}
.password-toggle:hover{background:#f1f5f9;color:var(--ink)}
.password-toggle[aria-pressed="true"]{color:var(--blue);background:#eff6ff}
.password-toggle .icon{width:18px;height:18px}

.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:9px 18px;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  border:1px solid transparent;
  border-radius:9px;
  line-height:1.4;
  transition:transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:active:not(:disabled){transform:scale(.98)}
.button .icon{width:17px;height:17px}
.primary{
  background:linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border-color:#2563eb;
  color:#fff;
  box-shadow:0 4px 12px rgba(37,99,235,.28);
}
.primary:hover{
  background:linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  color:#fff;
  transform:translateY(-1px);
}
.copied-btn{
  background:linear-gradient(135deg,#059669,#10b981)!important;
  border-color:#059669!important;
}
.outline{
  color:var(--blue);
  background:#fff;
  border-color:#bfdbfe;
}
.outline:hover{
  background:#eff6ff;
  border-color:#93c5fd;
  color:var(--blue-dark);
}
.danger{
  background:linear-gradient(135deg,#e11d48,#be123c);
  color:white;
  border-color:#be123c;
}
.danger:hover{background:#be123c}

.auth-submit{justify-content:flex-start;margin-top:4px;width:100%}
.auth-submit>.icon:last-child{margin-left:auto}
.auth-links{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:16px;padding-top:14px;border-top:1px dashed #e2e8f0;font-size:12.5px;font-weight:500}
.auth-note{margin:30px 0 8px;text-align:center;font-size:12px;color:#1e293b;font-weight:700;letter-spacing:.2px}
.auth-note span{margin:0 6px;color:#64748b}
.auth-help{font-size:12px;color:var(--muted);text-align:center;margin:0}
.muted{color:var(--muted)}
.auth-card .muted{margin:0 0 18px;font-size:13px}

.keygate-card{position:relative}
.keygate-heading{align-items:flex-start}
.keygate-stepper{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 22px;
  background:#f8fafc;
  border-bottom:1px solid var(--line);
  gap:8px;
}
.step-item{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  font-weight:600;
  color:#94a3b8;
}
.step-dot{
  width:24px;
  height:24px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:11px;
  font-weight:700;
  background:#e2e8f0;
  color:#64748b;
}
.step-item.current{color:var(--blue)}
.step-item.current .step-dot{
  background:linear-gradient(135deg,#2563eb,#4f46e5);
  color:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.16);
}
.step-item.done{color:var(--green)}
.step-item.done .step-dot{
  background:#10b981;
  color:#fff;
}
.step-line{
  flex:1;
  height:2px;
  background:#e2e8f0;
  border-radius:2px;
}
.step-line.active{
  background:linear-gradient(90deg,#10b981,#2563eb);
}
.keygate-meta-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px;
}
.meta-pill{
  font-size:11.5px;
  padding:5px 10px;
  border-radius:999px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  color:#475569;
}
.meta-pill strong{color:#0f172a;font-weight:700}
.keygate-lead{font-size:13.5px;line-height:1.65;color:#1e293b;margin:0 0 18px}
.keygate-cta{
  justify-content:space-between;
  min-height:46px;
  font-size:14px;
  padding:11px 20px;
}
.keygate-note{margin-top:16px!important;margin-bottom:0!important;font-size:12px;line-height:1.55}
.keygate-verify-box{
  text-align:center;
  padding:18px 16px 14px;
  margin-bottom:18px;
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:12px;
}
.verify-pulse-wrap{
  position:relative;
  width:60px;
  height:60px;
  margin:0 auto 14px;
  display:grid;
  place-items:center;
}
.verify-spinner{
  position:absolute;
  inset:0;
  border-radius:50%;
  border:3px solid #dbeafe;
  border-top-color:#2563eb;
  border-right-color:#4f46e5;
  will-change:transform;
  animation:spinRing 1s linear infinite;
}
.verify-countdown{
  font:700 14px/1 "Consolas",monospace;
  color:#1d4ed8;
}
#gate-status{
  font-size:13.5px;
  font-weight:600;
  color:#0f172a;
  margin:0 0 12px;
}
.gate-progress-track{
  width:100%;
  height:7px;
  background:#e2e8f0;
  border-radius:999px;
  overflow:hidden;
  margin-bottom:12px;
}
.gate-progress-bar{
  display:block;
  height:100%;
  width:25%;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#4f46e5,#06b6d4);
  transition:width .35s ease;
}
.keygate-reward-banner{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  background:linear-gradient(135deg,#ecfdf5,#eff6ff);
  border:1px solid #a7f3d0;
  border-radius:12px;
  margin-bottom:16px;
}
.reward-badge-icon{
  width:40px;
  height:40px;
  border-radius:10px;
  background:#10b981;
  color:#fff;
  display:grid;
  place-items:center;
  flex-shrink:0;
}
.keygate-reward-banner strong{display:block;font-size:13.5px;color:#065f46;margin-bottom:3px}
.keygate-reward-banner p{margin:0;font-size:12.5px;color:#334155;line-height:1.5}
.keygate-copy-box{margin-bottom:10px}
.copy-feedback{
  min-height:18px;
  margin:4px 0 12px;
  font-size:12.5px;
  font-weight:600;
  color:#059669;
}
.keygate-restart{width:100%;margin-top:6px}

.panel-shell{width:calc(100% - 48px);max-width:1200px;margin:26px auto 34px;padding:30px;min-height:650px}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}
.eyebrow{font-size:10px;letter-spacing:1.4px;color:#64748b;font-weight:700;text-transform:uppercase;margin-bottom:6px;display:block}
.page-heading h1{margin:0;font-size:28px;line-height:1.25;font-weight:750;letter-spacing:-.7px;color:#0f172a}
.page-heading p{margin:6px 0 0;color:#64748b;font-size:13px}

.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.stat-card{
  padding:18px 20px;
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 2px 8px rgba(15,23,42,.04);
  position:relative;
  overflow:hidden;
  transition:transform .18s ease, border-color .18s ease;
}
.stat-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:linear-gradient(90deg,var(--blue),var(--accent),var(--cyan));
}
.stat-card:hover{
  transform:translateY(-2px);
  border-color:#93c5fd;
}
.stat-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12.5px;color:#475569;font-weight:600}
.stat-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px}
.stat-icon .icon{width:18px;height:18px}
.blue{background:#eff6ff;color:var(--blue)}
.green{background:#ecfdf5;color:var(--green)}
.orange{background:#fffbeb;color:var(--orange)}
.red{background:#fef2f2;color:var(--red)}
.stat-number{font-size:31px;line-height:1.35;font-weight:750;margin-top:4px;letter-spacing:-.8px;color:#0f172a}
.stat-note{font-size:11.5px;color:#64748b;margin-top:4px}

.small-tag{font-size:10.5px;font-weight:600;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:4px 10px;white-space:nowrap;letter-spacing:.3px}
.create-card .card-body{padding:22px 24px 24px}
.create-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}
.field small{font-size:11px;color:#64748b;display:block;margin-top:7px}
.presets{display:flex;gap:6px;margin-top:8px}
.presets button{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#475569;
  border-radius:6px;
  font-size:10.5px;
  font-weight:600;
  white-space:nowrap;
  flex:1;
  padding:5px 6px;
  transition:background-color .15s ease, border-color .15s ease, color .15s ease;
}
.presets button:hover,.presets button[aria-pressed="true"]{
  background:#eff6ff;
  border-color:#93c5fd;
  color:var(--blue);
}
.presets button:disabled{opacity:.35;cursor:not-allowed}
.create-submit{align-self:end;padding-top:27px}

.new-key{
  padding:22px 24px;
  background:linear-gradient(135deg,#eff6ff 0%,#eef2ff 100%);
  border:1px solid #93c5fd;
  border-radius:var(--radius);
  margin-bottom:22px;
}
.new-key-heading{display:flex;align-items:center;gap:12px;margin-bottom:15px}
.new-key-icon{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,#2563eb,#4f46e5);color:#fff}
.new-key h2{font-size:15px;font-weight:700;margin:0}
.new-key p{font-size:12px;margin:3px 0 0;color:#475569}
.key-copy{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  background:white;
  border:1px solid #bfdbfe;
  padding:11px 14px;
  border-radius:10px;
}
.key-copy code{font:700 14px/1.6 "Consolas","SFMono-Regular",monospace;color:#1e3a8a;word-break:break-all}
.count-tag{font-size:11px;border-radius:999px;padding:2px 9px;background:#eff6ff;color:var(--blue);font-weight:600;border:1px solid #dbeafe}

.table-toolbar{display:flex;align-items:center;gap:12px;padding:18px 24px;flex-wrap:wrap;background:#fafcff;border-bottom:1px solid #f1f5f9}
.search-field{position:relative;flex:1;max-width:380px}
.search-field input{padding-left:38px;height:38px;font-size:12.5px;background:#fff}
.search-field>.icon{position:absolute;left:12px;top:10px;width:17px;height:17px;color:#94a3b8}
.table-toolbar>select{width:170px;height:38px;font-size:12.5px}
.page-size-label{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;color:var(--muted);margin:0 0 0 auto}
.page-size-label select{width:68px;height:38px;font-size:12px;padding:7px}

.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left}
th{
  background:#f8fafc;
  color:#64748b;
  letter-spacing:.7px;
  font-size:10.5px;
  font-weight:700;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:13px 18px;
  white-space:nowrap;
}
td{padding:16px 18px;border-bottom:1px solid #f1f5f9;font-size:12.5px;vertical-align:middle}
th:first-child,td:first-child{padding-left:24px}
th:last-child,td:last-child{padding-right:24px}
tbody tr:last-child td{border-bottom:0}
.key-row:hover td{background:#f8fbff}
.key-label{font:700 13px "Consolas",monospace;color:#1e3a8a;white-space:nowrap}
.cell-sub{display:block;margin-top:4px;color:#64748b;font-size:11px}
.product-name{color:#4f46e5;font-weight:600}
.owner-name{display:flex;align-items:center;gap:5px;max-width:260px;overflow-wrap:anywhere;color:#475569}
.owner-name .icon{width:12px;height:12px}
.date-label{color:#334155;white-space:nowrap;font-size:12px;font-weight:500}
.device-value{font-size:13px;font-weight:700;color:#334155;white-space:nowrap}
.device-value>span{font-size:11px;color:#94a3b8;font-weight:400}
.device-track{display:block;width:62px;height:4px;border-radius:4px;background:#e2e8f0;overflow:hidden;margin-top:7px}
.device-track>span{display:block;height:100%;background:linear-gradient(90deg,#3b82f6,#4f46e5)}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:5px 10px;
  font-size:10.5px;
  white-space:nowrap;
  font-weight:600;
}
.badge i{width:6px;height:6px;border-radius:50%;background:currentColor}
.badge.active{background:#ecfdf5;color:#059669;border:1px solid #a7f3d0}
.badge.pending{background:#eff6ff;color:#2563eb;border:1px solid #bfdbfe}
.badge.locked{background:#fffbeb;color:#d97706;border:1px solid #fde68a}
.badge.expired{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}

.row-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}
.row-actions form{margin:0}
.row-button{
  display:inline-flex;
  gap:5px;
  align-items:center;
  justify-content:center;
  height:32px;
  min-width:32px;
  border:1px solid #dbeafe;
  border-radius:7px;
  background:#f8fbff;
  color:#2563eb;
  padding:5px 9px;
  font-size:11px;
  font-weight:600;
  transition:background-color .15s ease, border-color .15s ease;
}
.row-button .icon{width:13px;height:13px}
.row-button:hover{background:#eff6ff;border-color:#93c5fd}
.row-button.reset{background:#f8fafc;border-color:#e2e8f0;color:#475569}
.row-button.reset:hover{background:#f1f5f9;border-color:#cbd5e1}
.row-button.delete{background:#fff1f2;border-color:#fecdd3;color:#e11d48}
.row-button.delete:hover{background:#ffe4e6;border-color:#fda4af}

.empty-state{text-align:center;padding:34px 20px;color:#94a3b8}
.empty-state>.icon{width:36px;height:36px;stroke-width:1.4}
.empty-state h3{color:#475569;font-size:14px;font-weight:600;margin:12px 0 4px}
.empty-state p{font-size:12px;margin:0}
.table-footer{border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:14px 24px;color:#64748b;font-size:11.5px;background:#fafcff}
.pagination{display:flex;align-items:center;gap:10px}
.compact{min-height:30px;height:30px;width:30px;padding:0;font-size:17px;font-weight:500}
.panel-hint{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11.5px;color:#475569;margin:22px 0 0;text-align:center}
.panel-hint .icon{width:14px;height:14px;color:var(--blue)}

.site-footer{
  margin-top:auto;
  background:#ffffff;
  border-top:1px solid var(--line);
  color:#64748b;
  font-size:11.5px;
}
.site-footer>div{max-width:1200px;margin:auto;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.site-footer strong{font-weight:700;color:#0f172a}

.server-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.health-status{display:flex;align-items:center;padding:13px 16px;background:#f1f5f9;border-radius:9px;color:#475569;font-size:13px;font-weight:600;margin-bottom:20px;gap:10px}
.health-status::before{content:"";width:8px;height:8px;flex-shrink:0;background:currentColor;border-radius:50%}
.health-status.good{background:#ecfdf5;color:#059669;border:1px solid #a7f3d0}
.health-status.bad{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}
.health-status.warning{background:#fffbeb;color:#d97706;border:1px solid #fde68a}
.info-list{margin:0 0 18px;font-size:12.5px}
.info-list>div{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid #f1f5f9}
.info-list dt{color:#64748b}
.info-list dd{margin:0;color:#1e293b;font-weight:600;text-align:right}
.text-link{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}
.text-link .icon{width:14px;height:14px}

.account-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:22px;align-items:start}
.profile-card{text-align:center;padding:35px 20px}
.profile-avatar{
  background:linear-gradient(135deg,#eff6ff,#e0e7ff);
  color:var(--blue);
  font-size:28px;
  font-weight:700;
  border-radius:50%;
  width:78px;
  height:78px;
  display:grid;
  place-items:center;
  margin:0 auto 16px;
  border:2px solid #bfdbfe;
}
.profile-card h2{font-size:20px;margin:0 0 10px;overflow-wrap:anywhere}
.profile-card p{margin:20px 0 0;color:#64748b;font-size:12px}
.account-layout .stack-form>.button{align-self:flex-start;margin-top:5px}

.toast{
  position:fixed;
  bottom:26px;
  left:50%;
  transform:translateX(-50%);
  padding:12px 22px;
  color:white;
  background:#0f172a;
  box-shadow:0 8px 20px rgba(15,23,42,.28);
  border-radius:999px;
  z-index:100;
  font-size:13px;
  font-weight:600;
  text-align:center;
  max-width:calc(100% - 32px);
}

dialog{
  padding:28px;
  border:1px solid var(--line);
  border-radius:16px;
  max-width:400px;
  width:calc(100% - 36px);
  color:var(--ink);
  box-shadow:0 20px 50px rgba(15,23,42,.3);
}
dialog::backdrop{background:rgba(15,23,42,.5)}
.dialog-icon{width:44px;height:44px;background:#fef2f2;color:#dc2626;display:grid;place-items:center;border-radius:12px;margin-bottom:16px}
dialog h2{margin:0 0 8px;font-size:20px}
dialog p{font-size:13px;color:#64748b;margin:0 0 25px}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px}

.security-policies{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px;font-size:12.5px;color:#334155}
.security-policies>span{display:flex;gap:9px;align-items:center;padding:8px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}
.security-policies .icon{color:var(--green);width:16px;height:16px}
.security-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
.stack-form>select{margin-bottom:18px}
.security-grid .stack-form>.button,.mfa-form>.button{align-self:flex-start}
.security-grid .muted{margin-top:0;font-size:12px}
.stat-number.status-word{font-size:23px;line-height:1.8}
.stat-number>small{font-size:13px;color:#64748b;font-weight:500}
.compact-text{padding:5px 11px;min-height:31px;font-size:11.5px}
.audit-table td{max-width:500px;overflow-wrap:anywhere}
.audit-table code{white-space:nowrap}
.mfa-form{max-width:480px}
.mfa-profile{color:var(--blue)!important;font-weight:600;margin-top:15px!important}
.mfa-secret{background:#eff6ff;border:1px solid #bfdbfe;padding:16px;border-radius:10px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.mfa-secret>span{width:100%;font-size:11px;color:#64748b;font-weight:600}
.mfa-secret>code{overflow-wrap:anywhere;font-size:15px;color:#1e3a8a;font-weight:700;letter-spacing:.6px;flex:1}
.mfa-cancel{margin-top:12px}
.recovery-layout{display:flex;gap:20px;align-items:flex-start}
.recovery-layout pre{margin:0;background:white;border:1px solid #bfdbfe;padding:16px;border-radius:10px;color:#1e3a8a;font:600 13px/1.8 Consolas,monospace;max-height:420px;overflow:auto;white-space:pre}
.card-body>.muted{font-size:12px;margin-top:0}
.security-grid table{min-width:600px}

.account-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
.management-form{display:flex;flex-wrap:wrap;gap:10px;align-items:end;min-width:320px;max-width:520px;white-space:normal}
.management-form label{display:flex;flex-direction:column;gap:5px;flex:1 1 130px;font-size:11px;color:#475569}
.management-form input,.management-form select{width:100%;min-width:100px;box-sizing:border-box}
.account-admin-grid .card-body p{line-height:1.7;font-size:13px}

@media(min-width:1600px){.auth-shell{margin-top:42px}}
@media(max-width:1100px){
  .topbar{height:auto;min-height:62px}
  .nav-container{flex-wrap:wrap;gap:0;padding:12px 20px}
  .nav-toggle{display:grid;margin-left:auto;order:2}
  .nav-account{margin-left:20px;order:1}
  .main-nav{display:none;order:3;width:100%;height:auto;flex-direction:column;gap:4px;margin-top:12px}
  .main-nav.open{display:flex}
  .main-nav a{padding:11px 12px;border-radius:8px}
  .main-nav a.current::after{display:none}
}
@media(max-width:1050px){
  .panel-shell{padding:23px}
  .create-submit{grid-column:1/-1;padding-top:0;display:flex;justify-content:flex-end}
  .stats-grid{gap:12px}
  .stat-card{padding:16px}
  .row-button.toggle span{display:none}
}
@media(max-width:760px){
  .brand{font-size:18px}
  .brand-caption{font-size:11px}
  .nav-account>span:not(.avatar){display:none}
  .nav-account form{margin-left:0}
  .panel-shell{width:calc(100% - 28px);margin-top:16px;padding:20px;min-height:650px}
  .page-heading{align-items:flex-start}
  .page-heading h1{font-size:24px}
  .page-heading p{font-size:12px;max-width:280px}
  .page-heading>.button{font-size:11px;padding:8px 11px;min-height:36px}
  .page-heading>.button .icon{width:14px;height:14px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .stat-number{font-size:27px}
  .create-grid{grid-template-columns:1fr 1fr}
  .create-grid>.product-field,.create-grid>.field:nth-child(2){grid-column:1/-1}
  .create-submit{grid-column:1/-1}
  .create-submit .button{width:100%}
  .table-toolbar{padding:16px}
  .search-field{max-width:none;flex:auto;width:100%}
  .table-toolbar>select{flex:1}
  .page-size-label{margin-left:0}
  .keys-card table{min-width:700px}
  .keys-card th,.keys-card td{padding-left:16px;padding-right:16px}
  .keys-card td:first-child,.keys-card th:first-child{padding-left:18px}
  .card-heading{padding:16px 18px}
  .card-body,.create-card .card-body{padding:18px}
  .card-heading p{font-size:11px}
  .card-heading h2{font-size:15px}
  .card-heading>.button{font-size:11px;padding:7px 9px;min-height:34px}
  .table-footer{padding:13px 16px}
  .new-key{padding:18px}
  .key-copy{align-items:stretch;flex-direction:column;gap:12px}
  .key-copy code{font-size:13px}
  .new-key p{font-size:11px}
  .account-layout,.account-admin-grid,.security-grid,.security-policies,.server-stats{grid-template-columns:1fr}
  .security-grid,.account-admin-grid{gap:0}
  .security-grid .stack-form>.button,.mfa-form>.button{width:100%}
  .recovery-layout{flex-direction:column}
  .mfa-secret>code{flex-basis:100%;font-size:13px}
  .audit-table{min-width:650px}
  .management-form{min-width:280px}
  .profile-card{padding:25px}
  .site-footer>div{padding:16px 20px}
  .site-footer>div>span:last-child{font-size:10px;text-align:right}
  .auth-shell{width:calc(100% - 28px);min-height:600px;margin:16px auto 24px;padding:34px 18px}
  .panel-hint{align-items:flex-start;text-align:left;line-height:1.6}
  .panel-hint .icon{margin-top:2px}
  .eyebrow{font-size:9px;letter-spacing:.8px}
  .keygate-stepper{padding:12px 16px}
  .step-label{font-size:11px}
}
@media(max-width:440px){
  .panel-shell{padding:15px}
  .page-heading{gap:10px}
  .page-heading h1{font-size:22px}
  .page-heading p{font-size:11px}
  .page-heading>.button{padding:8px 10px}
  .page-heading>.button .icon{display:none}
  .stat-card{padding:14px}
  .stat-top{font-size:11px}
  .stat-icon{width:28px;height:28px}
  .stat-note{font-size:10px}
  .create-grid{gap:14px 12px;grid-template-columns:1fr}
  .create-grid>.field{grid-column:auto}
  .presets{gap:4px;flex-wrap:wrap}
  .presets button{flex:1 1 40%;font-size:10px}
  .auth-shell{padding:28px 14px;min-height:560px}
  .brand-caption{max-width:140px;line-height:1.3;text-align:right}
  .nav-account{margin-left:12px}
  .page-heading>div{min-width:0}
  .row-button{padding:5px}
  .site-footer>div{align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
}

/* HQT application branding and accessible get-key application picker. */
.brand-logo{display:block;width:34px;height:34px;border-radius:8px;object-fit:contain;background:#000;flex-shrink:0}
.app-picker{display:flex;align-items:flex-end;gap:10px;margin:0 0 20px}
.app-picker .field{flex:1;min-width:0}
.app-picker select{width:100%}
.app-picker button{flex-shrink:0}
.app-menu-brand{display:flex;flex-direction:column;align-items:center;gap:10px;margin:0 0 22px;color:var(--ink)}
.app-menu-brand img{display:block;width:112px;height:112px;object-fit:contain;border-radius:20px;background:#000}
.keygate-specs{display:grid;gap:8px;margin:0 0 20px}
.spec-pill{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;background:#f8fafc;border:1px solid var(--line);border-radius:9px;font-size:13px}
.spec-pill>span{color:var(--muted)}
.spec-pill>strong{text-align:right;color:var(--ink)}
@media(max-width:420px){.app-picker{flex-direction:column;align-items:stretch}.app-picker button{width:100%}}

/* Admin permissions use native controls and remain usable on narrow screens. */
.permission-fieldset{min-width:0;border:1px solid var(--border,rgba(255,255,255,.14));border-radius:12px;padding:12px;margin:10px 0}
.permission-fieldset legend{font-weight:600;padding:0 5px}
.permission-options{display:grid;gap:8px;margin-bottom:8px}
.permission-option{display:flex!important;align-items:center;gap:8px;font-size:13px}
.permission-option input[type=checkbox]{width:18px;min-width:18px;height:18px;margin:0;accent-color:#6c83ff}
.permission-fieldset small{display:block;opacity:.75;line-height:1.5}
.management-form{min-width:200px}
