
/* Single-page architecture: shared chrome + interchangeable page roots */
.demo-page-root{
  display:contents;
}
.demo-page-root[hidden],
.section-metrics-bar[hidden],
.kpi-grid[hidden]{
  display:none!important;
}

/* Balance: only in card "Отчет по активам" */
.balance-report-view [data-section="asset-report"] .exchange-card .sbadge{
  font-size:7px;
  padding:2px 6px;
  letter-spacing:.03em;
}

.balance-exchange-name{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.balance-exchange-logo{
  width:16px;
  height:16px;
  border-radius:4px;
  object-fit:contain;
  background:transparent;
  flex-shrink:0;
}

/* Subscription scanner-style redesign */
.subx-grid{
  gap:16px;
}

.subx-info-card{
  position:relative;
  overflow:hidden;
  background:linear-gradient(145deg,color-mix(in srgb,var(--panel-high) 82%,#0b1120 18%) 0%,color-mix(in srgb,var(--panel-sunken) 86%,#070b14 14%) 100%);
  border:1px solid color-mix(in srgb,var(--brand) 22%,var(--line));
  box-shadow:0 18px 42px -24px rgba(0,0,0,.6),0 0 0 1px rgba(124,140,255,.09) inset;
}

.subx-hero-glow{
  position:absolute;
  top:-74px;
  right:-86px;
  width:240px;
  height:240px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(124,140,255,.24) 0%,rgba(124,140,255,0) 72%);
  pointer-events:none;
}

.subx-info-top{
  position:relative;
  z-index:1;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.subx-kicker{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
  color:var(--fg-mute);
  margin-bottom:6px;
}

.subx-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.subx-title{
  margin:0;
  font-size:28px;
  line-height:1;
  letter-spacing:-.03em;
  font-weight:900;
  color:var(--fg);
}

.subx-desc{
  margin:8px 0 0;
  max-width:640px;
  font-size:12px;
  color:var(--fg-dim);
  line-height:1.5;
}

.subx-info-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}

.subx-price{
  font-size:26px;
  font-weight:800;
  letter-spacing:-.03em;
  color:var(--fg);
}

.subx-price span{
  font-size:11px;
  color:var(--fg-mute);
  font-weight:700;
  letter-spacing:.06em;
}

.subx-stats{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.subx-progress-wrap{
  position:relative;
  z-index:1;
  margin:14px 0 14px;
}

.subx-progress-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:0;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  color:var(--fg-mute);
  text-transform:uppercase;
}

.subx-info-grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.subx-info-item{
  border:1px solid var(--line);
  border-radius:10px;
  background:color-mix(in srgb,var(--panel-sunken) 100%,#000 3%);
  padding:10px 11px;
}

.subx-info-item span{
  display:block;
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
  color:var(--fg-mute);
  margin-bottom:5px;
  text-transform:uppercase;
}

.subx-info-item b{
  font-size:12px;
  font-weight:700;
}


.subx-stat{
  border:1px solid var(--line);
  border-radius:10px;
  background:color-mix(in srgb,var(--panel-sunken) 100%,#000 3%);
  padding:10px 11px;
}

.subx-stat span{
  display:block;
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
  color:var(--fg-mute);
  margin-bottom:5px;
}

.subx-stat b{
  font-size:12px;
  font-weight:700;
}

.subx-bars .bar-row b,
.subx-bars .bar-row span{
  font-size:11px;
}

.subx-timeline .timeline-item{
  border:1px solid var(--line);
  border-radius:10px;
  padding:11px 12px;
  background:color-mix(in srgb,var(--panel-sunken) 100%,#000 4%);
}

.sub-history-layout{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);
  gap:12px;
}

.sub-history-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sub-history-row{
  position:relative;
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  border-left:3px solid var(--brand);
  background:var(--panel-sunken);
  border-radius:10px;
  padding:10px 12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:10px;
  align-items:center;
  cursor:pointer;
  transition:background .15s,border-color .15s,transform .15s;
}

.sub-history-row:hover,.sub-history-row.is-active{
  border-color:var(--line-strong);
  border-left-color:var(--up);
  background:color-mix(in srgb,var(--panel-high) 100%,#fff 4%);
}

.sub-history-row:hover{transform:translateX(2px)}

.sub-history-row::after{
  content:'›';
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  color:var(--fg-mute);
  font-size:18px;
  line-height:1;
  opacity:.7;
}

.sub-history-row-title{font-size:12px;font-weight:700;color:var(--fg)}
.sub-history-row-sub{font-size:10px;color:var(--fg-mute);margin-top:2px}
.sub-history-row-date{font-size:10px;color:var(--fg-mute);text-align:right}
.sub-history-row-amount{font-size:11px;color:var(--fg);font-weight:700;margin-top:2px;text-align:right}

.sub-history-detail{
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-sunken);
  padding:12px;
}

.sub-history-detail-body{
  display:grid;
  grid-template-columns:128px minmax(0,1fr);
  gap:12px;
}

.sub-history-detail-qrcol{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.sub-history-detail-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sub-history-detail-kicker{font-size:9px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:var(--fg-mute);margin-bottom:4px}
.sub-history-detail-title{font-size:14px;font-weight:800;color:var(--fg)}
.sub-history-detail-sub{font-size:10px;color:var(--fg-mute);margin-top:2px}
.sub-history-detail-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}
.sub-history-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.sub-history-detail-item{border:1px solid var(--line);border-radius:8px;padding:8px;background:var(--panel)}
.sub-history-detail-item span{display:block;font-size:9px;color:var(--fg-mute);text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.sub-history-detail-item b{font-size:11px;color:var(--fg)}
.sub-history-detail-box{display:grid;gap:8px}
.sub-history-detail-note{margin-top:8px;font-size:10.5px;color:var(--fg-dim)}

.sub-history-detail-warning{
  margin-top:10px;
  padding:10px 12px;
}

@media(max-width:900px){
  .subx-title{font-size:24px}
  .subx-price{font-size:22px}
  .subx-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:580px){
  .subx-info-top{flex-direction:column;align-items:flex-start}
  .subx-info-right{align-items:flex-start}
  .subx-info-grid{grid-template-columns:1fr}
  .sub-history-layout{grid-template-columns:1fr}
  .sub-history-detail-body{grid-template-columns:1fr}
}

/* Balance page: scanner trade-history style */
body.balance-page-active .content-shell>.section-toolbar{
  display:none!important;
}

body.subscription-page-active .content-shell>.section-toolbar{
  display:none!important;
}

body.api-page-active .content-shell>.section-toolbar{
  display:none!important;
}

.subscription-history-view .balhp-token-symbol{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.subscription-history-view .subhp-payment-details{
  grid-template-columns:repeat(2,minmax(260px,1fr));
  border-top:1px solid var(--line);
}

.subscription-history-view .subhp-payment-details .balhp-kv-val{
  max-width:100%;
}

@media(max-width:700px){
  .subscription-history-view .subhp-payment-details{grid-template-columns:1fr}
}

.subhp-list-head{
  padding:10px 16px;
  border-bottom:1px solid var(--line-strong);
  background:var(--panel);
  color:var(--fg-mute);
  font-size:9.5px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.subhp-pending-details{padding:12px 16px;background:var(--panel-sunken);border-top:1px solid var(--line)}
.subhp-pending-title{font-size:9px;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:var(--fg-faint);margin-bottom:8px}
.subhp-requisites-blocks{border-top:1px solid var(--line)}
.subhp-qr-block{display:flex;flex-direction:column;align-items:center;gap:8px}
.subhp-qr-wrap{width:112px;height:112px;background:#fff;padding:7px;border-radius:10px;border:1px solid var(--line);overflow:hidden}
.subhp-qr-wrap canvas{width:100%;height:100%}
.subhp-qr-caption{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--fg-mute);text-align:center}
.subhp-app-btn{width:100%;max-width:140px;padding:7px 0;border-radius:8px;font-size:10.5px;font-weight:800;border:1px solid var(--line-strong);background:var(--panel-high);color:var(--fg);cursor:pointer;transition:filter .15s;text-align:center;white-space:nowrap}
.subhp-app-btn:hover{filter:brightness(1.08)}
.subhp-warning{margin:0 16px 12px;padding:12px 14px;background:rgba(245,158,11,.06);border:1px solid rgba(245,158,11,.22);border-radius:10px;font-size:11px;color:color-mix(in srgb,#f59e0b 75%,var(--fg));line-height:1.55}
.subhp-warning strong{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px;opacity:.75}
.subhp-pay-actions{display:flex;justify-content:flex-end;padding:0 16px 14px}
.subhp-paid-btn{height:34px;padding:0 16px;border-radius:9px;background:var(--brand);color:#fff;font-size:11px;font-weight:900;border:1px solid var(--brand-border);cursor:pointer}
.subhp-paid-btn:disabled{opacity:.75;cursor:wait}
.subhp-pending-shell{background:var(--panel-sunken);border-top:1px solid var(--line)}
.subhp-pending-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,color-mix(in srgb,var(--warn) 8%,var(--panel)),var(--panel))}
.subhp-pending-kicker{font-size:8.5px;letter-spacing:.12em;text-transform:uppercase;font-weight:900;color:var(--fg-mute);margin-bottom:3px}
.subhp-pending-title-main{font-size:13px;font-weight:900;color:var(--fg);letter-spacing:-.01em}
.subhp-pending-grid{display:grid;grid-template-columns:160px minmax(0,1fr) minmax(240px,.75fr);gap:1px;background:var(--panel-edge);border-bottom:1px solid var(--line)}
.subhp-pending-qr-panel{background:var(--panel-sunken);padding:12px;display:flex;flex-direction:column;align-items:center;gap:8px}
.subhp-pending-main-card,.subhp-pending-status-card{border-radius:0;border:0}
.subhp-pending-bottom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 16px;background:var(--panel)}
.subhp-pending-bottom .subhp-warning{margin:0;width:fit-content;max-width:min(680px,100%);justify-self:start}
.subhp-pending-bottom .subhp-paid-btn{height:38px;min-width:136px;box-shadow:0 8px 20px -10px var(--brand)}
.apihp-warning{margin:12px 16px;padding:12px 14px;width:fit-content;max-width:min(720px,calc(100% - 32px));background:rgba(245,158,11,.06);border:1px solid rgba(245,158,11,.22);border-radius:10px;font-size:11px;color:color-mix(in srgb,#f59e0b 75%,var(--fg));line-height:1.55}
.apihp-warning strong{font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.api-modal-overlay{position:fixed;inset:0;z-index:600;display:grid;place-items:center;padding:16px;background:rgba(0,0,0,.68);backdrop-filter:blur(5px);opacity:0;pointer-events:none;transition:opacity .2s}
.api-modal-overlay.open{opacity:1;pointer-events:all}
.api-key-modal{width:min(540px,100%);max-height:92dvh;overflow:hidden;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 34px 80px rgba(0,0,0,.55);transform:translateY(8px) scale(.98);transition:transform .24s cubic-bezier(.22,1,.36,1)}
.api-modal-overlay.open .api-key-modal{transform:translateY(0) scale(1)}
.api-key-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,color-mix(in srgb,var(--brand) 8%,var(--panel)),var(--panel))}
.api-key-modal-title{font-size:15px;font-weight:900;letter-spacing:-.02em;color:var(--fg)}
.api-key-modal-sub{font-size:11px;color:var(--fg-mute);margin-top:3px;line-height:1.4}
.api-key-close{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--panel-high);color:var(--fg-mute);font-size:18px;line-height:1;cursor:pointer}
.api-key-close:hover{color:var(--fg);border-color:var(--line-strong)}
.api-key-tabs{display:flex;gap:6px;padding:10px 18px;border-bottom:1px solid var(--line);background:var(--panel)}
.api-key-tab{height:30px;padding:0 12px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--fg-mute);font-size:11px;font-weight:900;cursor:pointer}
.api-key-tab.active{background:var(--panel-high);border-color:var(--line);color:var(--fg)}
.api-key-modal-body{padding:16px 18px;display:grid;gap:12px;overflow-y:auto}
.api-tab-panel{display:none;gap:12px}
.api-tab-panel.active{display:grid}
.api-create-shell{display:grid;gap:12px}
.api-key-create-box,.api-create-shell{padding:12px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 8%,var(--panel-sunken)),var(--panel-sunken))}
.api-key-create-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.api-key-create-head b{display:block;font-size:12px;font-weight:900;color:var(--fg)}
.api-key-create-head span{display:block;font-size:10.5px;color:var(--fg-mute);margin-top:2px;line-height:1.35}
#api-key-return-hint{font-family:'JetBrains Mono',monospace;font-size:9.5px!important;font-weight:800;color:var(--brand)!important;text-align:right;max-width:180px;margin-top:0!important}
.api-key-exchange-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.api-key-exchange-grid button{height:30px;border-radius:8px;border:1px solid var(--line);background:var(--panel-high);color:var(--fg-dim);font-size:11px;font-weight:900;cursor:pointer}
.api-key-exchange-grid button:hover,.api-key-exchange-grid button.active{color:var(--fg);border-color:var(--brand-border);background:var(--brand-soft)}
.api-instruction-card{display:grid;gap:12px;padding:12px;border-radius:10px;border:1px solid var(--line);background:var(--panel)}
.api-instruction-title{font-size:12px;font-weight:900;color:var(--fg);letter-spacing:-.01em}
.api-instruction-steps{display:grid;gap:7px}
.api-instruction-steps div{display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;align-items:start}
.api-instruction-steps span{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:var(--brand-soft);border:1px solid var(--brand-border);color:var(--brand);font-size:9px;font-weight:900}
.api-instruction-steps p{margin:0;padding-top:3px;font-size:11px;color:var(--fg-dim);line-height:1.35}
.api-instruction-reqs{display:grid;gap:1px;background:var(--panel-edge);border:1px solid var(--line);border-radius:9px;overflow:hidden}
.api-instruction-reqs div{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;background:var(--panel-sunken);font-size:11px}
.api-instruction-reqs b{color:var(--fg-mute);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.api-instruction-reqs span{text-align:right;color:var(--fg);font-weight:800}
.api-open-exchange-btn{height:34px;border-radius:9px;border:1px solid var(--brand-border);background:var(--brand-soft);color:var(--brand);font-size:11px;font-weight:900;cursor:pointer}
.api-open-exchange-btn:hover{filter:brightness(1.1)}
.api-key-field{display:grid;gap:6px}
.api-key-field span{font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.09em;color:var(--fg-mute)}
.api-key-field input,.api-key-field select{width:100%;height:38px;border-radius:9px;border:1px solid var(--line);background:var(--panel-sunken);color:var(--fg);padding:0 11px;font-size:12px;font-weight:700;outline:none}
.api-key-field input:focus,.api-key-field select:focus{border-color:var(--brand-border);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent)}

/* Account profile: compact edit surface */
.profile-page-grid{
  gap:12px;
}

.profile-card{
  padding:16px;
}

.profile-main-layout{
  display:grid;
  grid-template-columns:minmax(220px,300px) minmax(320px,680px);
  justify-content:space-between;
  gap:clamp(18px,4vw,54px);
  align-items:start;
}

.profile-avatar-pane,
.profile-form-pane{
  min-width:0;
}

.profile-avatar-pane{
  max-width:300px;
  display:grid;
  gap:14px;
}

.profile-avatar-head,
.profile-form-head{
  margin:0;
}

.profile-avatar-zone{
  width:fit-content;
  display:grid;
  grid-template-columns:112px auto;
  gap:12px;
  align-items:center;
}

.profile-avatar-preview{
  width:112px;
  aspect-ratio:1;
  border-radius:50%;
  overflow:hidden;
  border:1px solid var(--line-strong);
  background:linear-gradient(145deg,var(--panel-sunken),var(--panel));
  display:grid;
  place-items:center;
  box-shadow:0 14px 30px -22px rgba(0,0,0,.6);
}

.profile-avatar-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.profile-avatar-preview span{
  font-size:30px;
  font-weight:900;
  color:var(--brand);
  letter-spacing:-.03em;
}

.profile-avatar-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.profile-icon-btn{
  width:36px;
  height:36px;
  border-radius:10px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:var(--panel-high);
  color:var(--fg-dim);
  transition:filter .15s,color .15s,border-color .15s,background .15s;
}

.profile-icon-btn:hover{
  color:var(--brand);
  border-color:var(--brand-border);
  background:var(--brand-soft);
}

.profile-icon-btn.danger:hover{
  color:var(--down);
  border-color:var(--down-border);
  background:var(--down-bg);
}

.profile-icon-btn:disabled{
  cursor:wait;
  opacity:.76;
}

.profile-icon-btn[data-loading="true"] svg{
  animation:profileIconSpin .8s linear infinite;
}

@keyframes profileIconSpin{
  to{transform:rotate(360deg)}
}

.profile-avatar-note,
.profile-save-hint{
  font-size:10.5px;
  line-height:1.45;
  color:var(--fg-mute);
}

.profile-form-pane{
  width:min(100%,680px);
  justify-self:end;
  display:grid;
  gap:14px;
}

.profile-form-grid{
  display:grid;
  gap:10px;
}

.profile-field input{
  height:42px;
}

.profile-meta-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.profile-meta-grid .balhp-kv{
  min-height:38px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel-sunken);
}

@media(max-width:900px){
  .profile-main-layout{
    grid-template-columns:1fr;
    gap:18px;
  }
  .profile-avatar-pane{
    max-width:none;
  }
  .profile-form-pane{
    width:100%;
    justify-self:stretch;
  }
  .profile-meta-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:520px){
  .profile-card{
    padding:12px;
  }
  .profile-avatar-zone{
    width:100%;
    grid-template-columns:96px 1fr;
  }
  .profile-avatar-preview{
    width:96px;
  }
  .profile-avatar-actions{
    flex-direction:row;
  }
  .profile-icon-btn{
    width:38px;
    height:38px;
  }
  .profile-form-head{
    align-items:flex-start;
    flex-direction:column;
  }
}
.api-key-rights{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--panel-sunken)}
.api-key-rights label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:var(--fg-dim)}
.api-key-rights input{accent-color:var(--brand)}
.api-key-rights span{margin-left:auto;color:var(--down);font-size:10px;font-weight:900}
.api-key-rights-static div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed color-mix(in srgb,var(--line) 60%,transparent);font-size:11.5px}
.api-key-rights-static div:last-child{border-bottom:0}
.api-key-rights-static b{font-size:11px;color:var(--fg);font-weight:900}
.api-key-rights-static span{margin-left:0;color:var(--fg-mute);font-size:10.5px;font-weight:700;text-align:right}
.api-key-note{padding:11px 12px;border-radius:10px;border:1px solid var(--warn-border);background:var(--warn-bg);color:var(--warn);font-size:11px;line-height:1.45}
.api-key-note strong{font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.api-key-modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--line);background:var(--panel-sunken)}
.api-key-secondary,.api-key-primary{height:34px;padding:0 14px;border-radius:9px;font-size:11px;font-weight:900;cursor:pointer;border:1px solid var(--line)}
.api-key-secondary{background:var(--panel-high);color:var(--fg-mute)}
.api-key-primary{background:var(--brand);border-color:var(--brand-border);color:#fff}

/* Account API v2 (legacy block kept for reference)
body.api-page-active #sectionMetricsBar,
body.api-page-active .section-metrics-bar,
body.api-page-active .page-hero,
body.api-page-active .content-shell>.section-toolbar,
body.api-page-active .content-shell .section-toolbar{
  display:none!important;
}

body.api-page-active #sectionMetricsBar,
body.api-page-active .section-metrics-bar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
}

body.api-page-active{
  grid-template-rows:56px 0 minmax(0,1fr)!important;
}

body.api-page-active #main{
  height:calc(100vh - 56px)!important;
}

body.api-page-active .content-shell{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}

body.api-page-active #pageContent{
  background:#f8fafc!important;
  color:#0f172a!important;
  padding:20px 26px 44px!important;
}

.apiv2-page{
  max-width:1120px;
  margin:0 auto;
  display:grid;
  gap:16px;
  font-family:Inter,system-ui,sans-serif;
}

body.api-page-active .apiv2-motion-item{
  opacity:0;
  transform:translateY(20px);
  animation:profileMotionIn .46s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay:var(--pm-delay,0ms);
}

.apiv2-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px;
  border-radius:20px;
  border:1px solid #bfdbfe;
  background:linear-gradient(150deg,#eff6ff,#f8fafc 72%);
}

.apiv2-hero-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.apiv2-hero-ico{
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#2563eb;
  box-shadow:0 18px 34px -24px rgba(37,99,235,.8);
}

.apiv2-hero-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.apiv2-hero-copy b{
  font-size:18px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:0;
  color:#0f172a;
}

.apiv2-hero-copy span{
  font-size:12px;
  line-height:1.4;
  color:#64748b;
  font-weight:700;
}

.apiv2-add-btn{
  height:38px;
  padding:0 16px;
  border-radius:10px;
  border:1px solid #1d4ed8;
  background:#2563eb;
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  cursor:pointer;
  white-space:nowrap;
}

.apiv2-add-btn:hover{
  filter:brightness(1.06);
}

.apiv2-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.apiv2-stat-cell{
  min-width:0;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 26px -24px rgba(15,23,42,.45);
  display:grid;
  gap:6px;
}

.apiv2-stat-cell span{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:#94a3b8;
}

.apiv2-stat-cell span i{
  width:14px;
  height:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
}

.apiv2-stat-cell b{
  font-size:18px;
  line-height:1.1;
  font-weight:900;
  color:#1e293b;
}

.apiv2-stat-cell b.up{color:#10b981}
.apiv2-stat-cell b.warn{color:#f59e0b}

.apiv2-card{
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 16px 38px -30px rgba(15,23,42,.28);
  overflow:hidden;
}

.apiv2-card-head{
  padding:14px 16px;
  border-bottom:1px solid #edf2f7;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.apiv2-card-head h3{
  margin:0;
  font-size:14px;
  font-weight:900;
  letter-spacing:.02em;
  color:#0f172a;
}

.apiv2-card-head p{
  margin:4px 0 0;
  font-size:11px;
  color:#64748b;
  font-weight:700;
}

.apiv2-filters{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.apiv2-filters button{
  height:30px;
  padding:0 11px;
  border-radius:8px;
  border:1px solid transparent;
  background:none;
  color:#64748b;
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.04em;
  cursor:pointer;
}

.apiv2-filters button:hover{
  color:#0f172a;
}

.apiv2-filters button.active{
  color:#0f172a;
  border-color:#cbd5e1;
  background:#f1f5f9;
}

.apiv2-table{
  border-top:0;
}

.apiv2-head,
.apiv2-row-main{
  display:grid;
  grid-template-columns:110px minmax(210px,1fr) 118px 172px 24px;
  gap:12px;
  align-items:center;
}

.apiv2-head{
  padding:8px 14px;
  border-bottom:1px solid #edf2f7;
  color:#94a3b8;
  font-size:8.5px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
  background:#f8fafc;
}

.apiv2-body{
  background:#fff;
}

.apiv2-row{
  border-bottom:1px solid #edf2f7;
}

.apiv2-row-main{
  padding:12px 14px;
  background:#fff;
  cursor:pointer;
}

.apiv2-row-main:hover{
  background:#f8fafc;
}

.apiv2-row-main:focus-visible{
  outline:2px solid #93c5fd;
  outline-offset:-2px;
}

.apiv2-col-check b,
.apiv2-col-key b{
  display:block;
  font-size:12px;
  font-weight:800;
  color:#0f172a;
  line-height:1.15;
}

.apiv2-col-check span,
.apiv2-col-key span{
  display:block;
  margin-top:4px;
  font-size:10px;
  color:#64748b;
  line-height:1.3;
}

.apiv2-col-perm{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10.5px;
  font-weight:800;
}

.apiv2-col-perm .up{color:#16a34a}
.apiv2-col-perm .brd{color:#4f46e5}
.apiv2-col-perm .dot{color:#94a3b8}

.apiv2-col-chevron{
  color:#64748b;
  font-size:14px;
  line-height:1;
}

.apiv2-mode-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:0 10px;
  border-radius:7px;
  border:1px solid #cbd5e1;
  font-size:9.5px;
  font-weight:900;
  letter-spacing:.06em;
  white-space:nowrap;
}

.apiv2-mode-badge.ok{
  color:#059669;
  border-color:#a7f3d0;
  background:#ecfdf5;
}

.apiv2-mode-badge.warn{
  color:#d97706;
  border-color:#fcd34d;
  background:#fffbeb;
}

.apiv2-chevron{
  display:inline-block;
  transform:rotate(0deg);
  transition:transform .18s;
}

.apiv2-chevron.is-open{
  transform:rotate(180deg);
}

.apiv2-row-detail-wrap{
  background:#f8fafc;
}

.apiv2-row-detail{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:10px 14px 14px;
}

.apiv2-detail-card{
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:10px 11px;
  background:#fff;
  display:grid;
  gap:8px;
}

.apiv2-detail-card h5{
  margin:0;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#64748b;
}

.apiv2-detail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.apiv2-detail-head h5{
  color:#0f172a;
}

.apiv2-delete-link{
  border:0;
  background:none;
  color:#ef4444;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
  padding:0;
  text-decoration:underline;
  text-underline-offset:2px;
}

.apiv2-kv{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px dashed #e2e8f0;
  padding-bottom:7px;
  font-size:11px;
}

.apiv2-kv:last-child{
  border-bottom:0;
  padding-bottom:0;
}

.apiv2-kv span{
  color:#64748b;
}

.apiv2-kv b{
  color:#0f172a;
  text-align:right;
}

.apiv2-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:84px;
  min-height:22px;
  padding:0 8px;
  border-radius:6px;
  font-size:9px;
  font-weight:900;
  letter-spacing:.06em;
  border:1px solid transparent;
}

.apiv2-pill.ok{
  color:#059669;
  background:#ecfdf5;
  border-color:#a7f3d0;
}

.apiv2-pill.bad{
  color:#dc2626;
  background:#fef2f2;
  border-color:#fecaca;
}

.apiv2-pill.warn{
  color:#d97706;
  background:#fffbeb;
  border-color:#fde68a;
}

.apiv2-empty{
  padding:24px 18px;
  text-align:center;
  display:grid;
  gap:6px;
  color:#64748b;
}

.apiv2-empty b{
  color:#0f172a;
  font-size:13px;
}

.apiv2-empty span{
  font-size:11px;
}

.apiv2-modal-overlay{
  position:fixed;
  inset:0;
  z-index:620;
  display:grid;
  place-items:center;
  padding:14px;
  background:rgba(15,23,42,.52);
  backdrop-filter:blur(4px);
}

.apiv2-modal{
  width:min(720px,100%);
  max-height:92dvh;
  overflow:hidden;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 34px 80px rgba(15,23,42,.36);
  display:flex;
  flex-direction:column;
}

.apiv2-modal.apiv2-modal-delete{
  width:min(460px,100%);
}

.apiv2-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(90deg,#eff6ff,#fff);
}

.apiv2-modal-head.danger{
  background:linear-gradient(90deg,#fef2f2,#fff);
}

.apiv2-modal-head h3{
  margin:0;
  font-size:16px;
  font-weight:900;
  color:#0f172a;
}

.apiv2-modal-head p{
  margin:4px 0 0;
  font-size:11px;
  color:#64748b;
  line-height:1.35;
}

.apiv2-close-btn{
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  color:#64748b;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}

.apiv2-close-btn:hover{
  color:#0f172a;
}

.apiv2-modal-tabs{
  display:flex;
  gap:6px;
  padding:10px 16px;
  border-bottom:1px solid #e2e8f0;
  background:#fff;
}

.apiv2-modal-tabs button{
  height:30px;
  padding:0 11px;
  border-radius:8px;
  border:1px solid transparent;
  background:none;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-modal-tabs button.active{
  color:#0f172a;
  background:#f1f5f9;
  border-color:#cbd5e1;
}

.apiv2-modal-body{
  padding:14px 16px;
  overflow-y:auto;
  display:grid;
  gap:11px;
}

.apiv2-field{
  display:grid;
  gap:6px;
}

.apiv2-field span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.09em;
  color:#64748b;
  text-transform:uppercase;
}

.apiv2-field input,
.apiv2-field select{
  width:100%;
  height:38px;
  border-radius:9px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  color:#0f172a;
  padding:0 11px;
  font-size:12px;
  font-weight:700;
  outline:none;
}

.apiv2-field input:focus,
.apiv2-field select:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(59,130,246,.15);
}

.apiv2-trade-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
  color:#334155;
}

.apiv2-trade-toggle input{
  accent-color:#2563eb;
}

.apiv2-note{
  border:1px solid #fde68a;
  border-radius:10px;
  background:#fffbeb;
  color:#b45309;
  font-size:11px;
  line-height:1.45;
  padding:10px 11px;
}

.apiv2-note strong{
  font-weight:900;
}

.apiv2-modal-foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding-top:2px;
}

.apiv2-btn{
  height:34px;
  padding:0 14px;
  border-radius:9px;
  border:1px solid #dbe4ee;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-btn.ghost{
  background:#f8fafc;
  color:#475569;
}

.apiv2-btn.primary{
  background:#2563eb;
  border-color:#1d4ed8;
  color:#fff;
}

.apiv2-btn.danger{
  background:#ef4444;
  border-color:#dc2626;
  color:#fff;
}

.apiv2-btn:disabled{
  opacity:.78;
  cursor:wait;
}

.apiv2-create-top{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.apiv2-create-pill{
  height:30px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-create-pill.active{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
}

.apiv2-create-card{
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:linear-gradient(145deg,#f8fafc,#f1f5f9);
  padding:12px;
  display:grid;
  gap:12px;
}

.apiv2-create-card h4{
  margin:0;
  font-size:12px;
  font-weight:900;
  color:#0f172a;
}

.apiv2-create-steps{
  display:grid;
  gap:8px;
}

.apiv2-create-step{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  gap:8px;
}

.apiv2-create-step span{
  width:22px;
  height:22px;
  border-radius:7px;
  display:grid;
  place-items:center;
  font-size:9px;
  font-weight:900;
  color:#1d4ed8;
  background:#eff6ff;
  border:1px solid #bfdbfe;
}

.apiv2-create-step p{
  margin:0;
  padding-top:3px;
  font-size:11px;
  color:#334155;
  line-height:1.35;
}

.apiv2-create-table{
  border:1px solid #e2e8f0;
  border-radius:9px;
  overflow:hidden;
  background:#e2e8f0;
  display:grid;
  gap:1px;
}

.apiv2-create-table>div{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:8px 10px;
  background:#f8fafc;
}

.apiv2-create-table span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  color:#64748b;
  text-transform:uppercase;
}

.apiv2-create-table b{
  font-size:11px;
  font-weight:800;
  color:#0f172a;
  text-align:right;
}

.apiv2-open-link{
  height:34px;
  border-radius:9px;
  border:1px solid #93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-delete-copy{
  font-size:12px;
  color:#475569;
  padding-bottom:4px;
}

@media(max-width:1100px){
  body.api-page-active #pageContent{
    padding:14px 12px 34px!important;
  }
}

@media(max-width:980px){
  .apiv2-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .apiv2-card-head{
    align-items:stretch;
  }
}

@media(max-width:860px){
  .apiv2-head{
    display:none;
  }
  .apiv2-row-main{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "key state"
      "check perm"
      "spacer chevron";
    gap:8px 12px;
  }
  .apiv2-col-key{grid-area:key}
  .apiv2-col-state{grid-area:state;justify-self:end}
  .apiv2-col-check{grid-area:check}
  .apiv2-col-perm{grid-area:perm}
  .apiv2-col-chevron{grid-area:chevron;justify-self:end}
  .apiv2-row-detail{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  body.api-page-active #main{
    height:calc(100dvh - 56px)!important;
  }
  body.api-page-active #pageContent{
    padding-top:calc(58px + 12px)!important;
  }
  .apiv2-page{
    gap:14px;
  }
  .apiv2-hero{
    align-items:stretch;
    flex-direction:column;
  }
  .apiv2-add-btn{
    width:100%;
  }
}

@media(max-width:640px){
  .apiv2-stats{
    grid-template-columns:1fr;
  }
  .apiv2-modal-overlay{
    align-items:end;
    padding:0;
  }
  .apiv2-modal,
  .apiv2-modal.apiv2-modal-delete{
    width:100%;
    border-radius:16px 16px 0 0;
    border-left:0;
    border-right:0;
    border-bottom:0;
  }
  .apiv2-modal-tabs{
    padding:8px 10px;
  }
  .apiv2-modal-tabs button{
    flex:1;
  }
  .apiv2-modal-foot{
    flex-direction:column-reverse;
  }
  .apiv2-btn{
    width:100%;
  }
  .apiv2-create-table>div{
    flex-direction:column;
    gap:4px;
  }
  .apiv2-create-table b{
    text-align:left;
  }
}
*/

/* Account API v2 (reference-match layout) */
body.api-page-active #sectionMetricsBar,
body.api-page-active .section-metrics-bar,
body.api-page-active .page-hero,
body.api-page-active .content-shell>.section-toolbar,
body.api-page-active .content-shell .section-toolbar{
  display:none!important;
}

body.api-page-active #sectionMetricsBar,
body.api-page-active .section-metrics-bar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
}

body.api-page-active{
  grid-template-rows:56px 0 minmax(0,1fr)!important;
}

body.api-page-active #main{
  height:calc(100vh - 56px)!important;
}

body.api-page-active .content-shell{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}

body.api-page-active #pageContent{
  background:#f4f6fa!important;
  color:#0f172a!important;
  padding:20px 26px 44px!important;
}

.apiv2-page{
  max-width:1120px;
  margin:0 auto;
  display:grid;
  gap:16px;
  font-family:Inter,system-ui,sans-serif;
}

body.api-page-active .apiv2-motion-item{
  opacity:0;
  transform:translateY(20px);
  animation:profileMotionIn .46s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay:var(--pm-delay,0ms);
}

.apiv2-controls{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

.apiv2-filter-pills{
  display:flex;
  align-items:center;
  gap:2px;
  padding:3px;
  background:#e8edf4;
  border-radius:14px;
  border:1px solid #e2e8f0;
}

.apiv2-filter-pills button{
  height:36px;
  padding:0 16px;
  border-radius:11px;
  border:1px solid transparent;
  background:none;
  color:#7f96ba;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
  text-transform:uppercase;
  cursor:pointer;
}

.apiv2-filter-pills button:hover{
  color:#35537f;
}

.apiv2-filter-pills button.active{
  background:#fff;
  border-color:#d0d9e7;
  color:#0b294f;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
}

.apiv2-compact-metrics{
  display:flex;
  align-items:stretch;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 1px 3px rgba(15,23,42,.06);
}

.apiv2-metric{
  min-width:86px;
  padding:7px 14px 8px;
  border-right:1px solid #ecf1f8;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
}

.apiv2-metric:last-child{
  border-right:0;
}

.apiv2-metric span{
  font-size:9px;
  font-weight:900;
  color:#8ba1c4;
  letter-spacing:.09em;
  text-transform:uppercase;
  line-height:1;
}

.apiv2-metric b{
  font-size:14px;
  line-height:1;
  color:#091d3f;
  font-weight:900;
  letter-spacing:-.01em;
}

.apiv2-metric b.up{color:#10b981}
.apiv2-metric b.warn{color:#f59e0b}

.apiv2-add-btn{
  height:40px;
  padding:0 22px;
  border-radius:16px;
  border:1px solid #d6deec;
  background:#fff;
  color:#0b294f;
  font-size:10px;
  font-weight:900;
  letter-spacing:.03em;
  text-transform:uppercase;
  cursor:pointer;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  box-shadow:0 1px 3px rgba(15,23,42,.07);
}

.apiv2-add-btn:hover{
  background:#f8fbff;
  border-color:#c9d5e7;
}

.apiv2-add-btn .plus{
  font-size:16px;
  line-height:1;
  color:#7f96ba;
}

.apiv2-table-shell{
  border:1px solid #dbe3ef;
  border-radius:30px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 2px 8px rgba(15,23,42,.05);
}

.apiv2-head,
.apiv2-row-main{
  display:grid;
  grid-template-columns:220px minmax(240px,1fr) 196px 168px 26px;
  gap:18px;
  align-items:center;
}

.apiv2-head{
  padding:17px 34px;
  border-bottom:1px solid #e8edf4;
  color:#7f96ba;
  font-size:11px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
  line-height:1;
  background:#f8fbff;
}

.apiv2-body{
  background:#fff;
}

.apiv2-row{
  border-bottom:1px solid #e8edf4;
}

.apiv2-row:last-child{
  border-bottom:0;
}

.apiv2-row-main{
  position:relative;
  padding:12px 20px 12px 26px;
  background:#fff;
  cursor:pointer;
}

.apiv2-row-main:hover{
  background:#fbfdff;
}

.apiv2-row-accent{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#10b981;
}

.apiv2-row.is-warn .apiv2-row-accent{
  background:#f59e0b;
}

.apiv2-row-main:focus-visible{
  outline:2px solid #93c5fd;
  outline-offset:-2px;
}

.apiv2-col-check b,
.apiv2-col-key b{
  display:block;
  font-size:12px;
  font-weight:900;
  color:#061a3b;
  line-height:1.08;
}

.apiv2-col-check span,
.apiv2-col-key span{
  display:block;
  margin-top:3px;
  font-size:9px;
  color:#88a0c3;
  line-height:1.2;
  font-weight:800;
}

.apiv2-col-perm{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:9px;
  font-weight:900;
  letter-spacing:.02em;
}

.apiv2-col-perm .up{color:#00a65a}
.apiv2-col-perm .brd{color:#1542ff}
.apiv2-col-perm .dot{
  width:4px;
  height:4px;
  border-radius:999px;
  background:#c1cfdf;
  display:inline-block;
  flex:0 0 auto;
  align-self:center;
  transform:none;
  vertical-align:middle;
}
.apiv2-col-perm .muted{color:#aab8ca}

.apiv2-col-chevron{
  color:#a8bbd3;
  font-size:13px;
  line-height:1;
}

.apiv2-mode-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0 8px;
  border-radius:7px;
  border:1px solid #bfe7d6;
  font-size:8.5px;
  font-weight:900;
  letter-spacing:.02em;
  white-space:nowrap;
}

.apiv2-mode-badge.ok{
  color:#059669;
  border-color:#bfe7d6;
  background:#ecfdf5;
}

.apiv2-mode-badge.warn{
  color:#f08a00;
  border-color:#f4d9aa;
  background:#fffbeb;
}

.apiv2-chevron{
  display:inline-block;
  transform:rotate(0deg);
  transition:transform .18s;
}

.apiv2-chevron.is-open{
  transform:rotate(180deg);
}

.apiv2-row-detail-wrap{
  background:#fff;
}

.apiv2-row-detail{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  padding:14px 20px 18px;
}

.apiv2-detail-panel{
  padding:0;
  background:transparent;
  display:grid;
  gap:10px;
}

.apiv2-detail-title{
  margin:0;
  padding-bottom:8px;
  border-bottom:1px solid #e7edf6;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7d96bb;
}

.apiv2-detail-title-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  padding-bottom:8px;
  border-bottom:1px solid #e7edf6;
}

.apiv2-detail-title-row .apiv2-detail-title{
  padding:0;
  border:0;
}

.apiv2-delete-link{
  border:0;
  background:none;
  color:#ff2f5b;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
  padding:0;
  text-transform:uppercase;
  letter-spacing:.02em;
  white-space:nowrap;
  text-decoration:none;
}

.apiv2-detail-grid{
  display:grid;
  gap:8px;
}

.apiv2-dline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:10px;
}

.apiv2-dline span{
  color:#7f96ba;
  font-weight:800;
  font-size:10px;
}

.apiv2-dline b{
  color:#0b2348;
  text-align:right;
  font-size:11px;
  font-weight:900;
}

.apiv2-dline b.mono{
  font-size:10px;
}

.apiv2-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  min-height:19px;
  padding:0 7px;
  border-radius:7px;
  font-size:8px;
  font-weight:900;
  letter-spacing:.02em;
  border:1px solid transparent;
}

.apiv2-pill.ok{
  color:#059669;
  background:#ecfdf5;
  border-color:#bfe7d6;
}

.apiv2-pill.bad{
  color:#dc2626;
  background:#fef2f2;
  border-color:#fbd0d0;
}

.apiv2-pill.warn{
  color:#f08a00;
  background:#fffbeb;
  border-color:#f4d9aa;
}

.apiv2-empty{
  padding:40px 24px;
  text-align:center;
  display:grid;
  gap:10px;
  color:#7f96ba;
}

.apiv2-empty b{
  color:#0b2348;
  font-size:18px;
}

.apiv2-empty span{
  font-size:13px;
}

.apiv2-modal-overlay{
  position:fixed;
  inset:0;
  z-index:620;
  display:grid;
  place-items:center;
  padding:14px;
  background:rgba(15,23,42,.52);
  backdrop-filter:blur(4px);
}

.apiv2-modal{
  width:min(720px,100%);
  max-height:92dvh;
  overflow:hidden;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 34px 80px rgba(15,23,42,.36);
  display:flex;
  flex-direction:column;
}

.apiv2-modal.apiv2-modal-delete{
  width:min(460px,100%);
}

.apiv2-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(90deg,#eff6ff,#fff);
}

.apiv2-modal-head.danger{
  background:linear-gradient(90deg,#fef2f2,#fff);
}

.apiv2-modal-head h3{
  margin:0;
  font-size:16px;
  font-weight:900;
  color:#0f172a;
}

.apiv2-modal-head p{
  margin:4px 0 0;
  font-size:11px;
  color:#64748b;
  line-height:1.35;
}

.apiv2-close-btn{
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  color:#64748b;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}

.apiv2-close-btn:hover{
  color:#0f172a;
}

.apiv2-modal-tabs{
  display:flex;
  gap:6px;
  padding:10px 16px;
  border-bottom:1px solid #e2e8f0;
  background:#fff;
}

.apiv2-modal-tabs button{
  height:30px;
  padding:0 11px;
  border-radius:8px;
  border:1px solid transparent;
  background:none;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-modal-tabs button.active{
  color:#0f172a;
  background:#f1f5f9;
  border-color:#cbd5e1;
}

.apiv2-modal-body{
  padding:14px 16px;
  overflow-y:auto;
  display:grid;
  gap:11px;
}

.apiv2-field{
  display:grid;
  gap:6px;
}

.apiv2-field span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.09em;
  color:#64748b;
  text-transform:uppercase;
}

.apiv2-field input,
.apiv2-field select{
  width:100%;
  height:38px;
  border-radius:9px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  color:#0f172a;
  padding:0 11px;
  font-size:12px;
  font-weight:700;
  outline:none;
}

.apiv2-field input:focus,
.apiv2-field select:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(59,130,246,.15);
}

.apiv2-trade-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
  color:#334155;
}

.apiv2-trade-toggle input{
  accent-color:#2563eb;
}

.apiv2-note{
  border:1px solid #fde68a;
  border-radius:10px;
  background:#fffbeb;
  color:#b45309;
  font-size:11px;
  line-height:1.45;
  padding:10px 11px;
}

.apiv2-note strong{
  font-weight:900;
}

.apiv2-modal-foot{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding-top:2px;
}

.apiv2-btn{
  height:34px;
  padding:0 14px;
  border-radius:9px;
  border:1px solid #dbe4ee;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-btn.ghost{
  background:#f8fafc;
  color:#475569;
}

.apiv2-btn.primary{
  background:#2563eb;
  border-color:#1d4ed8;
  color:#fff;
}

.apiv2-btn.danger{
  background:#ef4444;
  border-color:#dc2626;
  color:#fff;
}

.apiv2-btn:disabled{
  opacity:.78;
  cursor:wait;
}

.apiv2-create-top{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.apiv2-create-pill{
  height:30px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid #dbe4ee;
  background:#f8fafc;
  color:#475569;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-create-pill.active{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
}

.apiv2-create-card{
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:linear-gradient(145deg,#f8fafc,#f1f5f9);
  padding:12px;
  display:grid;
  gap:12px;
}

.apiv2-create-card h4{
  margin:0;
  font-size:12px;
  font-weight:900;
  color:#0f172a;
}

.apiv2-create-steps{
  display:grid;
  gap:8px;
}

.apiv2-create-step{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  gap:8px;
}

.apiv2-create-step span{
  width:22px;
  height:22px;
  border-radius:7px;
  display:grid;
  place-items:center;
  font-size:9px;
  font-weight:900;
  color:#1d4ed8;
  background:#eff6ff;
  border:1px solid #bfdbfe;
}

.apiv2-create-step p{
  margin:0;
  padding-top:3px;
  font-size:11px;
  color:#334155;
  line-height:1.35;
}

.apiv2-create-table{
  border:1px solid #e2e8f0;
  border-radius:9px;
  overflow:hidden;
  background:#e2e8f0;
  display:grid;
  gap:1px;
}

.apiv2-create-table>div{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:8px 10px;
  background:#f8fafc;
}

.apiv2-create-table span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  color:#64748b;
  text-transform:uppercase;
}

.apiv2-create-table b{
  font-size:11px;
  font-weight:800;
  color:#0f172a;
  text-align:right;
}

.apiv2-open-link{
  height:34px;
  border-radius:9px;
  border:1px solid #93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.apiv2-delete-copy{
  font-size:12px;
  color:#475569;
  padding-bottom:4px;
}

@media(max-width:1100px){
  body.api-page-active #pageContent{
    padding:14px 12px 34px!important;
  }
}

@media(max-width:980px){
  .apiv2-controls{
    gap:12px;
  }
  .apiv2-filter-pills{
    order:1;
  }
  .apiv2-compact-metrics{
    order:2;
  }
  .apiv2-add-btn{
    order:3;
  }
}

@media(max-width:860px){
  .apiv2-head{
    display:none;
  }
  .apiv2-row-main{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "key state"
      "check perm"
      "spacer chevron";
    gap:10px 14px;
    padding:12px 12px 12px 18px;
  }
  .apiv2-col-key{grid-area:key}
  .apiv2-col-state{grid-area:state;justify-self:end}
  .apiv2-col-check{grid-area:check}
  .apiv2-col-perm{grid-area:perm}
  .apiv2-col-chevron{grid-area:chevron;justify-self:end}
  .apiv2-col-check b,.apiv2-col-key b{font-size:12px}
  .apiv2-col-check span,.apiv2-col-key span,.apiv2-col-perm{font-size:9px}
  .apiv2-mode-badge{font-size:8px;min-height:20px;padding:0 7px;border-radius:7px}
  .apiv2-row-accent{width:5px}
  .apiv2-row-detail{
    gap:18px;
    padding:18px;
    grid-template-columns:1fr;
  }
  .apiv2-detail-title{font-size:9px;padding-bottom:7px}
  .apiv2-delete-link{font-size:9px}
  .apiv2-dline{font-size:9px}
  .apiv2-dline span{font-size:9px}
  .apiv2-dline b{font-size:10px}
  .apiv2-dline b.mono{font-size:10px}
  .apiv2-pill{font-size:8px;min-height:18px;border-radius:7px}
}

@media(max-width:760px){
  body.api-page-active #main{
    height:calc(100dvh - 56px)!important;
  }
  body.api-page-active #pageContent{
    padding-top:calc(58px + 12px)!important;
  }
  .apiv2-page{
    gap:14px;
  }
  .apiv2-controls{
    align-items:stretch;
    flex-direction:column;
  }
  .apiv2-filter-pills,
  .apiv2-compact-metrics,
  .apiv2-add-btn{
    width:100%;
  }
  .apiv2-filter-pills button{
    flex:1;
    padding:0 8px;
    font-size:10px;
  }
  .apiv2-compact-metrics{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .apiv2-metric{
    min-width:0;
    border-right:1px solid #ecf1f8;
  }
  .apiv2-metric:last-child{
    border-right:0;
  }
  .apiv2-metric b{font-size:14px}
  .apiv2-table-shell{border-radius:20px}
}

@media(max-width:640px){
  .apiv2-modal-overlay{
    align-items:end;
    padding:0;
  }
  .apiv2-modal,
  .apiv2-modal.apiv2-modal-delete{
    width:100%;
    border-radius:16px 16px 0 0;
    border-left:0;
    border-right:0;
    border-bottom:0;
  }
  .apiv2-modal-tabs{
    padding:8px 10px;
  }
  .apiv2-modal-tabs button{
    flex:1;
  }
  .apiv2-modal-foot{
    flex-direction:column-reverse;
  }
  .apiv2-btn{
    width:100%;
  }
  .apiv2-create-table>div{
    flex-direction:column;
    gap:4px;
  }
  .apiv2-create-table b{
    text-align:left;
  }
}

/* Account API keys: light management-table treatment inspired by reference mockup */
@media(max-width:640px){
  .subhp-warning{margin-left:12px;margin-right:12px}
  .subhp-pay-actions{padding-left:12px;padding-right:12px}
  .subhp-pending-head{padding:10px 12px;align-items:flex-start;flex-direction:column}
  .subhp-pending-grid{grid-template-columns:1fr}
  .subhp-pending-qr-panel{align-items:flex-start}
  .subhp-pending-bottom{grid-template-columns:1fr;padding:12px}
  .subhp-pending-bottom .subhp-warning{width:100%;max-width:none}
  .subhp-pending-bottom .subhp-paid-btn{width:100%}
  .apihp-warning{width:auto;max-width:none;margin-left:12px;margin-right:12px}
  .api-modal-overlay{align-items:end;padding:0}
  .api-key-modal{border-radius:18px 18px 0 0;border-left:0;border-right:0;border-bottom:0}
  .api-key-modal-foot{flex-direction:column-reverse}
  .api-key-secondary,.api-key-primary{width:100%}
  .api-key-tabs{padding:8px 10px}
  .api-key-tab{flex:1}
  .api-key-create-head{flex-direction:column}
  #api-key-return-hint{text-align:left;max-width:none}
  .api-key-exchange-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .api-instruction-reqs div{flex-direction:column;gap:4px}
  .api-instruction-reqs span{text-align:left}
}

.balance-history-view{
  background:var(--panel);
  border-top:1px solid var(--line);
  min-height:0;
}

.balhp-stats-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  background:var(--panel);
  border-bottom:1px solid var(--line);
}

.balhp-stat-cell{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 14px;
  border-right:1px solid var(--line);
}

.balhp-stat-cell:last-child{border-right:0}
.balhp-stat-cell>div:first-child{font-size:8.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:var(--fg-mute)}
.balhp-stat-cell>div:last-child{font-size:18px;font-weight:900;color:var(--fg);line-height:1.15}
.balhp-stat-cell .up{color:var(--up)}
.balhp-stat-cell .warn{color:var(--warn)}
.balhp-stat-cell .brd{color:var(--brand)}

.balhp-filters{
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 16px;
  border-bottom:1px solid var(--line);
  background:var(--panel);
  flex-wrap:wrap;
}

.balhp-filter-tab{
  padding:5px 10px;
  font-size:11.5px;
  font-weight:700;
  color:var(--fg-mute);
  background:none;
  border:1px solid transparent;
  border-radius:7px;
  cursor:pointer;
  transition:all .12s;
}

.balhp-filter-tab[aria-selected="true"]{color:var(--fg);background:var(--panel-high);border-color:var(--line)}
.balhp-filter-tab:hover{color:var(--fg-dim)}
.balhp-filter-sep{width:1px;height:18px;background:var(--line);margin:0 4px}
.balhp-filter-spacer{flex:1}
.balhp-export-btn,
.balhp-side-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  font-size:11px;
  font-weight:800;
  color:var(--fg-mute);
  background:var(--panel-high);
  border:1px solid var(--line);
  border-radius:7px;
  padding:6px 10px;
  cursor:pointer;
}
.balhp-export-btn:hover,
.balhp-side-btn:hover{color:var(--fg);border-color:var(--line-strong)}

.balhp-table-head,
.balhp-row{
  display:grid;
  grid-template-columns:14px 130px 170px minmax(120px,1fr) 110px 90px 90px 130px 30px;
  gap:10px;
  align-items:center;
}

.balhp-table-head{
  padding:8px 16px;
  border-bottom:1px solid var(--line-strong);
  background:var(--panel);
  font-size:9.5px;
  letter-spacing:.1em;
  text-transform:uppercase;
  font-weight:800;
  color:var(--fg-mute);
}

.balhp-table-head>div:nth-child(5),
.balhp-table-head>div:nth-child(6),
.balhp-table-head>div:nth-child(7),
.balhp-table-head>div:nth-child(8){text-align:right}

.balhp-scroll{min-height:0;background:var(--bg)}
.balhp-row{
  padding:10px 16px;
  border-bottom:1px solid var(--line);
  background:var(--bg);
  cursor:pointer;
  transition:background .12s;
}
.balhp-row:hover{background:color-mix(in srgb,var(--fg) 3%,transparent)}
.balhp-row[data-open="true"]{background:color-mix(in srgb,var(--brand) 5%,transparent)}
.balhp-row[data-open="true"] .balhp-chev{transform:rotate(180deg)}
.balhp-accent{width:3px;height:22px;border-radius:2px}
.balhp-time{font-size:11.5px;font-weight:700}
.balhp-muted{font-size:10px;color:var(--fg-mute);line-height:1.3}
.balhp-asset-main{min-width:0}
.balhp-logo-wrap .balance-exchange-name{font-size:12px;font-weight:800}
.balhp-logo-wrap .balance-exchange-logo{width:20px;height:20px;border-radius:6px}
.balhp-token-symbol{font-size:12px;font-weight:900;letter-spacing:.02em}
.balhp-route{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;color:var(--fg-faint)}
.balhp-num{text-align:right;font-size:11.5px;font-weight:800}
.balhp-num.up{color:var(--up)}
.balhp-num.warn{color:var(--warn)}
.balhp-num.brd{color:var(--brand)}
.balhp-status{text-align:right}
.balhp-chev-wrap{display:grid;place-items:center}
.balhp-chev{transition:transform .25s;color:var(--fg-mute)}

.balhp-detail{
  background:var(--panel-sunken);
  border-bottom:1px solid var(--line);
  overflow:hidden;
  max-height:0;
  transition:max-height .35s cubic-bezier(.22,1,.36,1);
}
.balhp-detail[data-open="true"]{max-height:1800px}
.balhp-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;border-bottom:1px solid var(--line)}
.balhp-trace-step{
  display:grid;
  grid-template-columns:24px minmax(0,1fr) 90px 120px;
  gap:10px;
  align-items:center;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  font-size:11.5px;
}
.balhp-trace-step:last-child{border-bottom:0}
.balhp-trace-step>div:nth-child(2)>div:first-child{font-weight:800}
.balhp-trace-step>div:nth-child(2)>div:last-child{font-size:10.5px;color:var(--fg-mute);margin-top:1px}
.balhp-trace-step>div:nth-child(3){text-align:right;font-size:11px;font-weight:800}
.balhp-trace-step>div:nth-child(4){text-align:right}
.balhp-trace-icon{width:22px;height:22px;border-radius:6px;display:grid;place-items:center;font-size:9px;font-weight:900}
.balhp-trace-icon.up{background:var(--up-bg);border:1px solid var(--up-border);color:var(--up)}
.balhp-trace-icon.warn{background:var(--warn-bg);border:1px solid var(--warn-border);color:var(--warn)}
.balhp-trace-icon.brd{background:var(--brand-soft);border:1px solid var(--brand-border);color:var(--brand)}
.balhp-side{border-left:1px solid var(--line);padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.balhp-side-btn{width:100%;margin-top:6px;padding:7px 0}
.balhp-blocks{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1px;background:var(--panel-edge);border-bottom:1px solid var(--line)}
.balhp-block{background:var(--panel-sunken);padding:10px 14px 12px}
.balhp-block-title{font-size:9px;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:var(--fg-faint);margin-bottom:8px}
.balhp-kv{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;font-size:11px;border-bottom:1px dashed color-mix(in srgb,var(--line) 50%,transparent)}
.balhp-kv:last-child{border-bottom:0}
.balhp-kv-key{color:var(--fg-mute);font-weight:600;flex-shrink:0}
.balhp-kv-val{color:var(--fg);font-weight:800;text-align:right;min-width:0;display:flex;justify-content:flex-end;gap:8px;align-items:center;word-break:break-word}
.balhp-kv-val.up{color:var(--up)}
.balhp-kv-val.warn{color:var(--warn)}
.balhp-kv-val.brd{color:var(--brand)}

@media(max-width:900px){
  .balhp-stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .balhp-table-head{display:none}
  .balhp-filters{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:6px 12px;scrollbar-width:none}
  .balhp-filters::-webkit-scrollbar{display:none}
  .balhp-filter-tab{flex-shrink:0;padding:4px 9px;font-size:11px}
  .balhp-filter-spacer,.balhp-export-btn{display:none}
  .balhp-row{
    grid-template-columns:4px minmax(0,1fr) auto 28px;
    grid-template-rows:auto auto;
    column-gap:10px;
    row-gap:3px;
    padding:10px 12px;
    align-items:start;
  }
  .balhp-row>div:nth-child(1){grid-column:1;grid-row:1/3;align-self:stretch;height:auto;min-height:38px}
  .balhp-row>div:nth-child(2){grid-column:2;grid-row:2}
  .balhp-row>div:nth-child(3){grid-column:2;grid-row:1}
  .balhp-row>div:nth-child(4){grid-column:3;grid-row:2;text-align:right;justify-content:flex-end;font-size:11px}
  .balhp-row>div:nth-child(5){display:none}
  .balhp-row>div:nth-child(6){grid-column:3;grid-row:1;text-align:right;font-size:12px}
  .balhp-row>div:nth-child(7),.balhp-row>div:nth-child(8){display:none}
  .balhp-row>div:nth-child(9){grid-column:4;grid-row:1/3;align-self:center}
  .balhp-detail-grid{grid-template-columns:1fr}
  .balhp-side{border-left:0;border-top:1px solid var(--line)}
  .balhp-trace-step{grid-template-columns:24px minmax(0,1fr) 90px}
  .balhp-trace-step>div:nth-child(4){display:none}
}

@media(max-width:520px){
  .balhp-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .balhp-stat-cell{padding:8px 10px}
  .balhp-stat-cell>div:last-child{font-size:15px}
  .balhp-blocks{grid-template-columns:1fr}
  .balhp-block{padding:8px 10px 10px}
  .balhp-kv{font-size:10.5px}
}

/* Unified dense typography: apply scanner/history text rhythm across app pages */
.terminal-topbar .brand-title,
.sidebar-title,
.metric-strip-heading,
.section-toolbar h2,
.card-title,
.balhp-token-symbol,
.sub-history-row-title,
.settings-block-title,
.api-key-modal-title{
  font-size:12px!important;
  line-height:1.18!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
}

.metric-strip-heading,
.section-toolbar h2,
.card-title,
.sidebar-title,
.api-key-modal-title{
  font-size:13px!important;
  letter-spacing:-.01em!important;
}

.terminal-topbar .topnav-link,
.side-link,
.side-link b,
.mob-acc-head,
.mob-acc-sub,
.action-btn,
.balhp-filter-tab,
.balhp-side-btn,
.balhp-export-btn,
.setting-main b,
.token-row b,
.exchange-card b,
.api-key-tab,
.api-key-field input,
.api-key-field select{
  font-size:11.5px!important;
  line-height:1.2!important;
  font-weight:800!important;
  letter-spacing:0!important;
}

.section-toolbar p,
.card-sub,
.sidebar-sub,
.side-link small,
.hero-email,
.setting-main span,
.muted,
.balhp-muted,
.sub-history-row-sub,
.api-key-modal-sub,
.api-instruction-steps p,
.notification-detail-text p{
  font-size:10.5px!important;
  line-height:1.38!important;
  font-weight:650!important;
  letter-spacing:0!important;
}

.sb-label,
.metric-strip-label,
.kpi-label,
.field-group label,
.api-key-field span,
.balhp-table-head,
.balhp-block-title,
.balhp-stat-cell>div:first-child,
.subhp-list-head,
.subhp-pending-kicker,
.settings-block-title,
.logic-hint p strong{
  font-size:9px!important;
  line-height:1.1!important;
  font-weight:900!important;
  letter-spacing:.1em!important;
  text-transform:uppercase!important;
}

.metric-strip-value,
.terminal-topbar .quick-metric .value,
.balhp-time,
.balhp-num,
.balhp-kv,
.balhp-trace-step,
.sub-history-row-date,
.sub-history-row-amount,
.sbadge,
.notification-count-chip,
.mob-acc-badge,
.side-link em,
.sub-dur-pill,
.subhp-app-btn,
.subhp-paid-btn{
  font-size:10.5px!important;
  line-height:1.2!important;
  font-weight:800!important;
}

.balhp-stat-cell>div:last-child,
.kpi-value,
.subx-price{
  font-size:16px!important;
  line-height:1.1!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}

.field,
.select,
.textarea,
.api-key-field input,
.api-key-field select{
  font-size:11.5px!important;
  line-height:1.25!important;
  font-weight:700!important;
}

.balhp-table-head,
.balhp-row{
  font-size:11px!important;
}

@media(max-width:700px){
  .metric-strip-heading,
  .section-toolbar h2,
  .card-title,
  .sidebar-title{font-size:12px!important}
  .balhp-stat-cell>div:last-child,
  .kpi-value{font-size:15px!important}
}

/* Late mobile override: notifications have checkbox/delete columns, unlike generic balhp rows. */
@media(max-width:900px){
  .notification-history-view .balhp-row.notification-history-row{
    grid-template-columns:4px 26px minmax(0,1fr) 28px!important;
    grid-template-rows:auto auto auto!important;
    column-gap:10px!important;
    row-gap:3px!important;
    min-height:auto!important;
    height:auto!important;
    padding:11px 12px!important;
    align-items:start!important;
    overflow:visible!important;
  }
  .notification-history-view .balhp-row.notification-history-row>.balhp-accent{
    grid-column:1!important;
    grid-row:1/4!important;
    align-self:stretch!important;
    height:auto!important;
    min-height:52px!important;
  }
  .notification-history-view .balhp-row.notification-history-row>.notification-select{
    grid-column:2!important;
    grid-row:1/4!important;
    align-self:center!important;
    display:grid!important;
  }
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(3){
    grid-column:3!important;
    grid-row:2!important;
    display:block!important;
    min-width:0!important;
    line-height:1.25!important;
  }
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(4){
    grid-column:3!important;
    grid-row:1!important;
    display:block!important;
    min-width:0!important;
    line-height:1.25!important;
  }
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(4) .balhp-muted{
    grid-column:3!important;
    display:block!important;
    margin-top:3px!important;
    line-height:1.25!important;
  }
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(5){
    grid-column:3!important;
    grid-row:3!important;
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    text-align:left!important;
    color:var(--fg-faint)!important;
    font-size:10px!important;
    line-height:1.2!important;
  }
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(5) span{display:inline!important}
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(6),
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(7),
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(8),
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(9),
  .notification-history-view .balhp-row.notification-history-row>.notification-delete-row{
    display:none!important;
  }
  .notification-history-view .balhp-row.notification-history-row>div:nth-child(11){
    grid-column:4!important;
    grid-row:1/4!important;
    display:grid!important;
    align-self:center!important;
  }
  .notification-history-view .balhp-token-symbol,
  .notification-history-view .balhp-muted{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
}

@media(max-width:700px){
  .notification-history-view{
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }
  .notification-history-view .balhp-scroll{
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }
  .notification-history-detail[data-open="true"]{
    max-height:none!important;
    overflow:visible!important;
  }
}

/* Demo header restyle based on assets/src/header_app.jsx */
#unifiedTopbar.header-app-shell.terminal-topbar{
  grid-template-columns:minmax(240px,330px) minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:16px!important;
  min-height:58px!important;
  padding:6px 18px!important;
  background:
    radial-gradient(circle at top right,color-mix(in srgb,var(--brand) 18%,transparent),transparent 34%),
    linear-gradient(180deg,color-mix(in srgb,var(--panel) 92%,transparent),color-mix(in srgb,var(--panel-high) 98%,transparent))!important;
  border-bottom:1px solid color-mix(in srgb,var(--line-strong) 90%,transparent)!important;
  box-shadow:0 18px 44px -30px rgba(0,0,0,.55)!important;
  backdrop-filter:blur(18px)!important;
}

:root[data-theme="light"] #unifiedTopbar.header-app-shell.terminal-topbar{
  background:
    radial-gradient(circle at top right,rgba(79,70,229,.10),transparent 34%),
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,248,251,.96))!important;
}

#unifiedTopbar.header-app-shell .topbar-left,
#unifiedTopbar.header-app-shell .brand,
#unifiedTopbar.header-app-shell .topbar-right{
  display:flex!important;
  align-items:center!important;
  align-self:center!important;
  gap:10px!important;
  min-width:0!important;
}

#unifiedTopbar.header-app-shell .brand{gap:12px!important}

#unifiedTopbar.header-app-shell .brand-logo{
  width:38px!important;
  height:38px!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,var(--brand),color-mix(in srgb,var(--brand) 52%,#7c3aed))!important;
  box-shadow:0 16px 34px -18px color-mix(in srgb,var(--brand) 62%,transparent)!important;
  color:#fff!important;
  font-size:0!important;
}

#unifiedTopbar.header-app-shell .brand-logo svg{display:block;width:15px;height:15px}
#unifiedTopbar.header-app-shell .brand-copy{min-width:0}

#unifiedTopbar.header-app-shell .brand-kicker{
  margin-bottom:2px;
  color:var(--fg-mute);
  font-size:8px;
  font-weight:900;
  letter-spacing:.15em;
  text-transform:uppercase;
}

#unifiedTopbar.header-app-shell .brand-title{
  font-size:13px!important;
  line-height:1!important;
  letter-spacing:-.03em!important;
}

#unifiedTopbar.header-app-shell .brand-sub{
  margin-top:4px;
  color:var(--fg-dim)!important;
  font-size:10px!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
}

#unifiedTopbar.header-app-shell .topnav-main{
  justify-content:center!important;
  gap:8px!important;
  border-radius:999px!important;
  overflow:hidden;
}

#unifiedTopbar.header-app-shell .topnav-link{
  height:34px!important;
  padding:0 22px!important;
  border-radius:999px!important;
  border:1px solid transparent!important;
  background:transparent!important;
  color:var(--fg-dim)!important;
  font-size:11px!important;
  font-weight:800!important;
  box-shadow:none!important;
}

#unifiedTopbar.header-app-shell .topnav-link:hover{
  color:var(--fg)!important;
  background:color-mix(in srgb,var(--panel-high) 84%,transparent)!important;
  border-color:color-mix(in srgb,var(--line) 95%,transparent)!important;
}

#unifiedTopbar.header-app-shell .topnav-link.active{
  color:var(--brand)!important;
  background:color-mix(in srgb,var(--brand) 12%,var(--panel-high))!important;
  border-color:color-mix(in srgb,var(--brand) 26%,var(--line))!important;
  box-shadow:0 8px 22px -18px color-mix(in srgb,var(--brand) 72%,transparent)!important;
}

#unifiedTopbar.header-app-shell .topbar-right{gap:8px!important}

#unifiedTopbar.header-app-shell .unified-theme-btn.icon-only{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--panel-high) 94%,transparent)!important;
  border:1px solid color-mix(in srgb,var(--line) 95%,transparent)!important;
  color:var(--fg-dim)!important;
  box-shadow:none!important;
}

#unifiedTopbar.header-app-shell .unified-theme-btn.icon-only:hover{
  color:var(--fg)!important;
  background:color-mix(in srgb,var(--panel-high) 100%,#fff 3%)!important;
}

#unifiedTopbar.header-app-shell .quick-metric.user-balance{
  min-width:140px!important;
  height:34px!important;
  padding:4px 8px!important;
  border-radius:999px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--up) 9%,var(--panel-high)) 0%,color-mix(in srgb,var(--panel-high) 94%,transparent) 100%)!important;
  border:1px solid color-mix(in srgb,var(--up) 28%,var(--line))!important;
  box-shadow:none!important;
}

#unifiedTopbar.header-app-shell .quick-metric.user-balance .label{
  color:color-mix(in srgb,var(--up) 36%,var(--fg-mute))!important;
  font-size:7px!important;
  line-height:1!important;
  letter-spacing:.14em!important;
}

#unifiedTopbar.header-app-shell .quick-metric.user-balance .value{
  margin-top:1px;
  color:var(--fg)!important;
  font-size:10px!important;
  line-height:1!important;
  letter-spacing:-.02em!important;
  font-family:'JetBrains Mono',monospace!important;
  font-weight:800!important;
}

#unifiedTopbar.header-app-shell .topnav-profile-btn{
  width:54px!important;
  min-width:54px!important;
  height:54px!important;
  padding:0!important;
  border-radius:16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:0;
  gap:0;
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
  color:var(--fg)!important;
  transition:background .15s,border-color .15s,box-shadow .15s;
  align-self:center!important;
  margin-top:0!important;
  transform:none!important;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu-wrap{
  position:relative;
  display:flex!important;
  align-items:center!important;
  align-self:center!important;
  line-height:0;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  min-width:180px;
  padding:8px;
  border-radius:12px;
  border:1px solid color-mix(in srgb,var(--line-strong) 88%,transparent);
  background:
    linear-gradient(180deg,color-mix(in srgb,var(--panel-high) 97%,#fff 3%),color-mix(in srgb,var(--panel) 96%,#000 4%));
  box-shadow:
    0 18px 36px -24px rgba(0,0,0,.75),
    0 10px 22px -20px rgba(0,0,0,.6),
    0 0 0 1px rgba(255,255,255,.03) inset;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  z-index:40;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu::before{
  content:'';
  position:absolute;
  top:-6px;
  right:14px;
  width:10px;
  height:10px;
  border-top:1px solid color-mix(in srgb,var(--line-strong) 88%,transparent);
  border-left:1px solid color-mix(in srgb,var(--line-strong) 88%,transparent);
  background:color-mix(in srgb,var(--panel-high) 96%,#fff 4%);
  transform:rotate(45deg);
}

#unifiedTopbar.header-app-shell .topnav-profile-menu[hidden]{
  display:none!important;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu-item{
  width:100%;
  height:38px;
  border:1px solid color-mix(in srgb,var(--line) 82%,transparent);
  border-radius:10px;
  background:color-mix(in srgb,var(--panel-sunken) 72%,var(--panel));
  color:var(--down);
  font-size:12px;
  font-weight:900;
  letter-spacing:.01em;
  text-align:left;
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  transition:background .14s,border-color .14s,color .14s,transform .14s,box-shadow .14s;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu-item-ico{
  width:14px;
  height:14px;
  opacity:.78;
  flex-shrink:0;
  transition:transform .14s,opacity .14s;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu-item:hover{
  background:linear-gradient(180deg,color-mix(in srgb,var(--down) 16%,var(--panel)),color-mix(in srgb,var(--down) 10%,var(--panel-sunken)));
  border-color:color-mix(in srgb,var(--down) 42%,var(--line-strong));
  color:color-mix(in srgb,var(--down) 88%,#fff 12%);
  transform:translateY(-1px);
  box-shadow:0 10px 18px -16px rgba(239,68,68,.75),0 0 0 1px rgba(239,68,68,.1) inset;
}

#unifiedTopbar.header-app-shell .topnav-profile-menu-item:hover .topnav-profile-menu-item-ico{
  opacity:1;
  transform:translateX(1px);
}

#unifiedTopbar.header-app-shell .topnav-profile-menu-item:focus-visible{
  outline:none;
  border-color:color-mix(in srgb,var(--down) 54%,var(--line-strong));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--down) 20%,transparent);
}

:root[data-theme="light"] #unifiedTopbar.header-app-shell .topnav-profile-menu{
  background:linear-gradient(180deg,#ffffff,#f7f9fd);
  border-color:#d7deee;
  box-shadow:0 16px 34px -22px rgba(15,23,42,.28),0 0 0 1px rgba(255,255,255,.8) inset;
}

:root[data-theme="light"] #unifiedTopbar.header-app-shell .topnav-profile-menu::before{
  background:#ffffff;
  border-top-color:#d7deee;
  border-left-color:#d7deee;
}

:root[data-theme="light"] #unifiedTopbar.header-app-shell .topnav-profile-menu-item{
  background:#ffffff;
  border-color:#d7deee;
  color:#d92828;
}

:root[data-theme="light"] #unifiedTopbar.header-app-shell .topnav-profile-menu-item:hover{
  background:linear-gradient(180deg,#fff3f3,#ffe8e8);
  border-color:#f0a7a7;
  color:#c61f1f;
}

#unifiedTopbar.header-app-shell .topnav-profile-btn:hover{
  background:transparent!important;
  border-color:transparent!important;
  transform:none!important;
}

#unifiedTopbar.header-app-shell .topnav-profile-btn::before{
  content:none!important;
}

#unifiedTopbar.header-app-shell .topnav-profile-avatar{
  width:46px;
  height:46px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--brand),#7c3aed);
  color:#fff;
  flex-shrink:0;
  overflow:hidden;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--line-strong) 88%,transparent);
  transition:box-shadow .16s ease,filter .16s ease;
}

#unifiedTopbar.header-app-shell .topnav-profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

#unifiedTopbar.header-app-shell .topnav-profile-btn:hover .topnav-profile-avatar{
  box-shadow:
    0 0 0 2px color-mix(in srgb,var(--brand) 45%,transparent),
    0 0 0 5px color-mix(in srgb,var(--brand) 16%,transparent);
  filter:saturate(1.03);
}

#unifiedTopbar.header-app-shell .topnav-profile-btn:focus-visible{
  outline:none;
}

#unifiedTopbar.header-app-shell .topnav-profile-btn:focus-visible .topnav-profile-avatar{
  box-shadow:
    0 0 0 2px color-mix(in srgb,var(--brand) 52%,transparent),
    0 0 0 6px color-mix(in srgb,var(--brand) 20%,transparent);
}

#unifiedTopbar.header-app-shell .topnav-profile-copy{
  display:none!important;
}

#unifiedTopbar.header-app-shell .mobile-menu-btn{
  width:34px!important;
  height:34px!important;
  border-radius:12px!important;
  background:color-mix(in srgb,var(--panel-high) 94%,transparent)!important;
  border:1px solid color-mix(in srgb,var(--line) 95%,transparent)!important;
  color:var(--fg)!important;
}

#unifiedTopbar.header-app-shell .mobile-menu-btn svg{display:block}

@media(max-width:1100px){
  #unifiedTopbar.header-app-shell.terminal-topbar{
    grid-template-columns:minmax(0,1fr) auto!important;
  }

  #unifiedTopbar.header-app-shell .topnav-main,
  #unifiedTopbar.header-app-shell .quick-metric.user-balance{
    display:none!important;
  }
}

@media(max-width:700px){
  #unifiedTopbar.header-app-shell.terminal-topbar{
    min-height:58px!important;
    padding:8px 12px!important;
    gap:8px!important;
  }

  #unifiedTopbar.header-app-shell .brand{gap:8px!important}

  #unifiedTopbar.header-app-shell .brand-logo{
    width:34px!important;
    height:34px!important;
    border-radius:12px!important;
  }

  #unifiedTopbar.header-app-shell .brand-kicker,
  #unifiedTopbar.header-app-shell .brand-sub,
  #unifiedTopbar.header-app-shell .topnav-profile-copy{
    display:none!important;
  }

  #unifiedTopbar.header-app-shell .topnav-profile-btn{
    width:52px!important;
    min-width:52px!important;
    height:52px!important;
    padding:0!important;
    justify-content:center!important;
    border-radius:16px!important;
    margin-top:0!important;
  }

  #unifiedTopbar.header-app-shell .topnav-profile-avatar{
    width:44px;
    height:44px;
  }
}

#sidebarContent{
  display:flex;
  flex-direction:column;
  min-height:100%;
}

.sidebar-v2-nav{
  flex:1;
  padding:8px;
  position:relative;
}

.sidebar-v2-link{
  min-height:52px!important;
  border-radius:12px!important;
  padding:0 12px!important;
  transition:background-color .22s ease,color .22s ease,border-color .22s ease,box-shadow .22s ease;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#475569!important;
}

.sidebar-v2-link-main{
  display:flex;
  align-items:center;
  gap:10px;
}

.sidebar-v2-active-arrow{
  position:absolute;
  right:22px;
  top:0;
  transform:translateY(-50%);
  color:#fff;
  font-size:18px;
  line-height:1;
  opacity:0;
  pointer-events:none;
  z-index:3;
  transition:top .28s cubic-bezier(.22,1,.36,1),opacity .18s ease;
}

.sidebar-v2-active-arrow.is-visible{
  opacity:1;
}

.sidebar-v2-link .link-chevron{
  display:none!important;
}

.sidebar-v2-link-icon{
  width:28px;
  height:28px;
  border-radius:8px;
  display:grid;
  place-items:center;
  color:#6b86ad;
  transition:color .2s ease;
}

.sidebar-v2-link.is-current .sidebar-v2-link-icon{
  color:#fff;
}

.sidebar-v2-link:not(.is-current):hover{
  background:#f8fafc!important;
}

.sidebar-v2-link.is-current{
  background:#2563eb!important;
  color:#fff!important;
  border-color:#1d4ed8!important;
  box-shadow:0 8px 18px -12px rgba(37,99,235,.9)!important;
}

.sidebar-v2-link.is-current b,
.sidebar-v2-link.is-current em{
  color:#fff!important;
}

.sidebar-v2-link em{
  opacity:0;
  color:#6b86ad!important;
  transition:opacity .18s ease,color .18s ease,transform .18s ease;
  transform:translateX(-2px);
}

#sidebarContent .sidebar-v2-link em{
  background:none!important;
  border:0!important;
  box-shadow:none!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  border-radius:0!important;
  padding:0!important;
  display:inline!important;
  line-height:1!important;
}

#sidebarContent .sidebar-v2-link em.link-chevron{
  display:none!important;
}

.sidebar-v2-link.is-current em{
  opacity:1;
  transform:translateX(0);
}

/* Hard-match sidebar visuals with arbitrizor-profile-settings */
#sidebarContent .sidebar-v2-link{
  opacity:1!important;
  filter:none!important;
  border-left:0!important;
}

#sidebarContent .sidebar-v2-link::before,
#sidebarContent .sidebar-v2-link::after{
  content:none!important;
}

#sidebarContent .sidebar-v2-link.is-current{
  background:#2563eb!important;
  border:1px solid #1d4ed8!important;
  box-shadow:0 8px 18px -12px rgba(37,99,235,.9)!important;
  color:#fff!important;
  opacity:1!important;
}

#sidebarContent .sidebar-v2-link.is-current .sidebar-v2-link-icon,
#sidebarContent .sidebar-v2-link.is-current b,
#sidebarContent .sidebar-v2-link.is-current em{
  color:#fff!important;
  opacity:1!important;
}

.sidebar-v2-footer{
  margin-top:auto;
  padding:14px 8px 10px;
  border-top:1px solid var(--line);
}

.sidebar-v2-stats{
  display:grid;
  gap:10px;
  margin-bottom:12px;
  padding:12px 12px 11px;
  border:1px solid #dbe3ef;
  border-radius:16px;
  background:#f8fafc;
}

.sidebar-v2-stat{
  min-height:0;
  padding:0;
  display:grid;
  grid-template-columns:20px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  border:0;
  border-radius:0;
  background:transparent;
}

.sidebar-v2-stat-ico{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  color:#64748b;
}

.sidebar-v2-stat-ico svg{
  width:17px;
  height:17px;
  display:block;
}

.sidebar-v2-stat-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#334155;
  font-size:11px;
  font-weight:800;
  letter-spacing:0;
}

.sidebar-v2-stat-value{
  margin:0;
  white-space:nowrap;
  color:#0f172a;
  font-size:11px;
  line-height:1;
  font-weight:900;
}

.sidebar-v2-stat-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:24px;
  padding:0 9px;
  border-radius:10px;
  border:0;
  white-space:nowrap;
  font-size:11px;
  line-height:1;
  font-weight:900;
  letter-spacing:0;
}

.sidebar-v2-stat-pill.is-up{
  color:#059669;
  background:#dcfce7;
}

.sidebar-v2-stat-pill.is-brd{
  color:#1d4ed8;
  background:#dbeafe;
}

.sidebar-v2-stat.is-shield .sidebar-v2-stat-ico,
.sidebar-v2-stat.is-card .sidebar-v2-stat-ico{
  color:#16a34a;
}

.sidebar-v2-stat.is-key .sidebar-v2-stat-ico,
.sidebar-v2-stat.is-radio .sidebar-v2-stat-ico{
  color:#2563eb;
}

.sidebar-v2-stat.is-key .sidebar-v2-stat-label{
  color:#2563eb;
}

.sidebar-v2-process-card{
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
  background:#fff;
}

.sidebar-v2-process-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#94a3b8;
  margin-bottom:8px;
}

.sidebar-v2-process-head i{
  width:20px;
  height:8px;
  border-radius:999px;
  background:linear-gradient(90deg,#e2e8f0,#cbd5e1,#e2e8f0);
}

.sidebar-v2-process-card p{
  margin:0;
  font-size:12px;
  font-weight:700;
  color:#64748b;
}

.sidebar-v2-logout-btn{
  width:100%;
  height:38px;
  margin-top:10px;
  border:0;
  background:transparent;
  color:#94a3b8;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
}

.sidebar-v2-logout-btn:hover{
  color:#f43f5e;
}

body.profile-v2-active #sectionMetricsBar,
body.profile-v2-active .section-metrics-bar,
body.profile-v2-active .page-hero,
body.profile-v2-active .content-shell>.section-toolbar,
body.profile-v2-active .content-shell .section-toolbar{
  display:none!important;
}

body.profile-v2-active #sectionMetricsBar,
body.profile-v2-active .section-metrics-bar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
}

body.profile-v2-active{
  grid-template-rows:56px 0 minmax(0,1fr)!important;
}

body.profile-v2-active #main{
  height:calc(100vh - 56px)!important;
}

body.profile-v2-active .content-shell{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}

body.profile-v2-active #pageContent{
  padding:20px 26px 44px;
}

.account-v2-page{
  max-width:1380px;
  margin:0 auto;
  display:grid;
  gap:24px;
}

.account-v2-header{
  display:grid;
  gap:18px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(148,163,184,.25);
}

.account-v2-title-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.account-v2-title-wrap h1{
  margin:0;
  font-size:34px;
  font-weight:900;
  letter-spacing:-.03em;
  color:#0f172a;
}

.account-v2-title-wrap p{
  margin:4px 0 0;
  color:#94a3b8;
  font-size:14px;
  font-weight:700;
}

.account-v2-title-icon{
  width:56px;
  height:56px;
  border-radius:18px;
  display:grid;
  place-items:center;
  color:#fff;
  background:#2563eb;
  box-shadow:0 14px 32px -20px rgba(37,99,235,.9);
}

.account-v2-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.account-v2-stat{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:20px;
  padding:12px 14px;
}

.account-v2-stat span{
  display:block;
  font-size:9px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#94a3b8;
  margin-bottom:7px;
}

.account-v2-stat b{
  font-size:18px;
  font-weight:900;
  letter-spacing:-.02em;
  color:#0f172a;
}

.account-v2-action-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.account-v2-action-row h2{
  margin:0;
  font-size:30px;
  font-weight:900;
  letter-spacing:-.03em;
  color:#0f172a;
}

.account-v2-action-row p{
  margin:5px 0 0;
  font-size:14px;
  color:#64748b;
  font-weight:600;
}

.account-v2-save-btn{
  height:48px;
  padding:0 24px;
  border:0;
  border-radius:16px;
  background:#2563eb;
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  box-shadow:0 16px 36px -22px rgba(37,99,235,.95);
}

.account-v2-save-btn:disabled{
  opacity:.7;
}

.account-v2-grid{
  display:grid;
  grid-template-columns:minmax(280px,.95fr) minmax(420px,1.4fr);
  gap:18px;
  align-items:start;
}

.account-v2-left-col{
  display:grid;
  gap:18px;
}

.account-v2-card{
  border:1px solid #e2e8f0;
  border-radius:34px;
  background:#fff;
  box-shadow:0 2px 4px rgba(15,23,42,.03);
  overflow:hidden;
}

.account-v2-card-head{
  padding:18px 24px;
  border-bottom:1px solid #eef2f7;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.account-v2-card-head h3{
  margin:0;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.2em;
  color:#334155;
}

.account-v2-avatar-wrap{
  padding:24px;
  display:grid;
  justify-items:center;
  gap:12px;
}

.account-v2-avatar-preview{
  width:min(280px,100%);
  aspect-ratio:1/1;
  border-radius:48px;
  overflow:hidden;
  border:10px solid #fff;
  box-shadow:0 26px 50px -28px rgba(37,99,235,.3);
  background:#f8fafc;
}

.account-v2-avatar-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.account-v2-avatar-actions{
  display:flex;
  gap:10px;
}

.account-v2-avatar-note{
  margin:4px 0 0;
  font-size:10px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#94a3b8;
}

.account-v2-readonly-list{
  padding:18px 20px 20px;
  display:grid;
  gap:10px;
}

.account-v2-readonly{
  border:1px solid #eef2f7;
  background:#f8fafc;
  border-radius:20px;
  padding:14px 16px;
  display:grid;
  gap:7px;
}

.account-v2-readonly span{
  font-size:10px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#94a3b8;
}

.account-v2-readonly b{
  font-size:18px;
  font-weight:900;
  color:#0f172a;
}

.account-v2-main-card .account-v2-form-grid{
  padding:26px 28px 30px;
  display:grid;
  gap:20px;
}

.account-v2-field{
  display:grid;
  gap:8px;
}

.account-v2-field span{
  font-size:11px;
  font-weight:900;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:#94a3b8;
}

.account-v2-field input{
  height:54px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
  padding:0 18px;
  font-size:16px;
  font-weight:700;
  color:#0f172a;
}

.account-v2-field input:focus{
  outline:none;
  border-color:#3b82f6;
  box-shadow:0 0 0 8px rgba(59,130,246,.1);
  background:#fff;
}

.account-v2-sync-btn{
  height:26px;
  padding:0 10px;
  border:0;
  border-radius:8px;
  background:#eff6ff;
  color:#2563eb;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}

.account-v2-notice{
  margin-top:8px;
  border:1px solid #dbeafe;
  border-radius:26px;
  background:rgba(239,246,255,.7);
  padding:16px 18px;
  display:grid;
  grid-template-columns:42px 1fr;
  gap:12px;
}

.account-v2-notice-icon{
  width:38px;
  height:38px;
  border-radius:12px;
  background:#2563eb;
  color:#fff;
  display:grid;
  place-items:center;
}

.account-v2-notice strong{
  display:block;
  color:#1e3a8a;
  font-size:14px;
  margin-bottom:3px;
}

.account-v2-notice p{
  margin:0;
  color:#1e3a8a;
  opacity:.82;
  font-size:13px;
  line-height:1.45;
}

@media(max-width:1100px){
  body.profile-v2-active #pageContent{
    padding:14px 12px 34px;
  }
  .account-v2-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:700px){
  .account-v2-title-wrap h1{
    font-size:28px;
  }
  .account-v2-stats{
    grid-template-columns:1fr;
  }
  .account-v2-action-row h2{
    font-size:24px;
  }
  .account-v2-action-row .account-v2-save-btn{
    width:100%;
  }
}

/* Account profile exact-fit pass (React reference parity) */
.account-v3-page{
  gap:15px;
}

.account-v3-title-icon{
  border-radius:22px;
  box-shadow:0 18px 34px -24px rgba(37,99,235,.95);
}

.account-v3-stat{
  border-radius:14px;
  padding:8px 9px;
}

.account-v3-hrow{
  display:flex;
  align-items:center;
  gap:7px;
}

.account-v3-hrow i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:13px;
  padding:0 5px;
  border-radius:4px;
  background:#dcfce7;
  color:#16a34a;
  font-size:6px;
  font-style:normal;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.account-v2-card{
  border-color:#e2e8f0a6;
  border-radius:24px;
  box-shadow:0 2px 4px rgba(0,0,0,.02);
}

.account-v2-card-head{
  background:#f8fafc99;
}

.account-v2-card-head h3{
  display:flex;
  align-items:center;
  gap:10px;
}

.account-v3-head-ico{
  width:20px;
  height:20px;
  border-radius:8px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#3b82f6;
  display:grid;
  place-items:center;
}

.account-v2-avatar-preview{
  width:min(154px,100%);
  border-width:6px;
}

.account-v2-avatar-actions{
  margin-top:-2px;
}

.account-v2-main-card .account-v2-form-grid{
  padding:17px 17px 20px;
  gap:11px;
}

.account-v2-field input{
  height:36px;
  border-radius:13px;
  padding:0 11px;
  font-size:13px;
  font-weight:700;
}

.account-v2-notice{
  border-radius:18px;
  padding:10px 11px;
}

/* Header final match: remove nav capsule and heavy profile chip */
#unifiedTopbar.header-app-shell.terminal-topbar{
  min-height:58px!important;
  height:58px!important;
  padding:0 18px!important;
  gap:16px!important;
  background:var(--panel)!important;
  background-image:none!important;
  border-bottom:1px solid var(--line)!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}

#unifiedTopbar.header-app-shell .brand{
  gap:10px!important;
}

#unifiedTopbar.header-app-shell .brand-logo{
  width:28px!important;
  height:28px!important;
  border-radius:8px!important;
}

#unifiedTopbar.header-app-shell .brand-logo svg{
  width:13px!important;
  height:13px!important;
}

#unifiedTopbar.header-app-shell .brand-title{
  font-size:15px!important;
  font-weight:800!important;
  line-height:1!important;
  letter-spacing:-.015em!important;
  color:var(--fg)!important;
}

#unifiedTopbar.header-app-shell .brand-kicker,
#unifiedTopbar.header-app-shell .brand-sub{
  display:none!important;
}

#unifiedTopbar.header-app-shell .topnav-main{
  height:auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  gap:8px!important;
  overflow:visible!important;
}

#unifiedTopbar.header-app-shell .topnav-link{
  height:34px!important;
  padding:0 12px!important;
  border-radius:9px!important;
  font-size:12px!important;
  font-weight:800!important;
  color:var(--fg-dim)!important;
  background:transparent!important;
  border:1px solid transparent!important;
}

#unifiedTopbar.header-app-shell .topnav-link:hover{
  background:var(--panel-high)!important;
  border-color:var(--line)!important;
  color:var(--fg)!important;
}

#unifiedTopbar.header-app-shell .topnav-link.active{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
  box-shadow:0 8px 18px -12px rgba(37,99,235,.9)!important;
}

#unifiedTopbar.header-app-shell .header-nav-icon{
  width:14px;
  height:14px;
}

#unifiedTopbar.header-app-shell .topbar-right{
  gap:10px!important;
}

#unifiedTopbar.header-app-shell .header-icon-group{
  padding-right:8px!important;
  border-right:0!important;
  gap:2px!important;
}

#unifiedTopbar.header-app-shell .header-icon-btn{
  width:28px!important;
  height:28px!important;
  border-radius:8px!important;
  color:var(--fg-mute)!important;
  background:transparent!important;
  border:1px solid transparent!important;
}

#unifiedTopbar.header-app-shell .header-icon-btn:hover{
  color:var(--fg)!important;
  background:var(--panel-high)!important;
}

#unifiedTopbar.header-app-shell .header-bell-dot{
  top:6px;
  right:6px;
  width:6px;
  height:6px;
}

#unifiedTopbar.header-app-shell .header-profile-btn{
  min-width:170px!important;
  height:40px!important;
  padding:0 10px 0 14px!important;
  border-radius:8px!important;
  background:transparent!important;
  border:1px solid transparent!important;
  gap:8px!important;
}

#unifiedTopbar.header-app-shell .header-profile-btn:hover{
  background:var(--panel-high)!important;
  border-color:var(--line)!important;
}

#unifiedTopbar.header-app-shell .header-profile-copy strong{
  font-size:9px!important;
  color:var(--fg-mute)!important;
  letter-spacing:.12em!important;
  line-height:1!important;
}

#unifiedTopbar.header-app-shell .header-profile-copy small{
  font-size:11px!important;
  color:var(--fg)!important;
  font-weight:800!important;
  line-height:1.05!important;
  max-width:108px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

#unifiedTopbar.header-app-shell .topnav-profile-avatar{
  width:30px!important;
  height:30px!important;
  border-radius:8px!important;
  box-shadow:none!important;
}

@media(max-width:1100px){
  #unifiedTopbar.header-app-shell .header-profile-copy{
    display:none!important;
  }
}

/* Header hard override (final): no gradients, no vertical artifact */
#unifiedTopbar,
#unifiedTopbar.terminal-topbar,
#unifiedTopbar.header-app-shell.terminal-topbar,
#unifiedTopbar.header-app-shell.terminal-topbar{
  background:var(--panel)!important;
  background-image:none!important;
  box-shadow:none!important;
}

#unifiedTopbar.header-app-shell .header-icon-group{
  border-right:0!important;
  box-shadow:none!important;
}

#unifiedTopbar.header-app-shell .header-icon-group::before,
#unifiedTopbar.header-app-shell .header-icon-group::after,
#unifiedTopbar.header-app-shell .topbar-right::before,
#unifiedTopbar.header-app-shell .topbar-right::after{
  content:none!important;
  display:none!important;
}

#unifiedTopbar.header-app-shell .header-profile-copy{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  justify-content:center!important;
  min-width:0!important;
}

#unifiedTopbar.header-app-shell .header-profile-copy strong{
  line-height:1!important;
}

#unifiedTopbar.header-app-shell .header-profile-copy small{
  line-height:1.05!important;
}

/* Ultra-final header flattening */
#unifiedTopbar,
#unifiedTopbar.terminal-topbar,
#unifiedTopbar.header-app-shell,
#unifiedTopbar.header-app-shell.terminal-topbar{
  background:var(--panel)!important;
  background-color:var(--panel)!important;
  background-image:none!important;
  opacity:1!important;
  filter:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Icons: no square highlight, only color change */
#unifiedTopbar .header-icon-group{
  border-right:0!important;
  padding-right:6px!important;
  gap:6px!important;
}

#unifiedTopbar .header-icon-btn,
#unifiedTopbar .unified-theme-btn.icon-only,
#unifiedTopbar #themeToggle{
  width:auto!important;
  min-width:auto!important;
  height:auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--fg-mute)!important;
}

#unifiedTopbar .header-icon-btn:hover,
#unifiedTopbar .unified-theme-btn.icon-only:hover,
#unifiedTopbar #themeToggle:hover{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:var(--fg)!important;
}

#unifiedTopbar .header-icon-btn:focus-visible,
#unifiedTopbar .unified-theme-btn.icon-only:focus-visible,
#unifiedTopbar #themeToggle:focus-visible{
  outline:none!important;
  box-shadow:none!important;
}

/* Force-flat header and subbar (kill any remaining gradients from earlier layers) */
#unifiedTopbar,
#unifiedTopbar.terminal-topbar,
#unifiedTopbar.header-app-shell,
#unifiedTopbar.header-app-shell.terminal-topbar{
  background:var(--panel)!important;
  background-color:var(--panel)!important;
  background-image:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

#sectionMetricsBar,
.section-metrics-bar{
  background:var(--panel)!important;
  background-color:var(--panel)!important;
  background-image:none!important;
  box-shadow:none!important;
}

/* Fix bell-dot artifact (was rendering as vertical inline fragment) */
#unifiedTopbar .header-bell-btn{
  position:relative!important;
}

#unifiedTopbar .header-bell-dot{
  position:absolute!important;
  display:block!important;
  top:2px!important;
  right:0!important;
  width:6px!important;
  height:6px!important;
  border-radius:999px!important;
  background:#f43f5e!important;
  border:2px solid var(--panel)!important;
  line-height:0!important;
  font-size:0!important;
  pointer-events:none!important;
}

/* Header right-side alignment fix: keep icons before profile */
#unifiedTopbar .topbar-right{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
}

#unifiedTopbar .header-icon-group{
  order:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding-right:6px!important;
  flex-shrink:0!important;
}

@media(min-width:701px){
  #unifiedTopbar .topbar-right .topnav-profile-menu-wrap,
  #unifiedTopbar .topbar-right .header-profile-wrap{
    order:2!important;
    margin-left:2px!important;
    flex-shrink:0!important;
  }
}

#unifiedTopbar .header-profile-btn,
#unifiedTopbar .topnav-profile-btn{
  order:2!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-shrink:0!important;
}

/* Header profile hover fix: remove legacy pseudo fragments */
#unifiedTopbar .header-profile-btn{
  position:relative!important;
  overflow:visible!important;
}

#unifiedTopbar .header-profile-btn::before,
#unifiedTopbar .header-profile-btn::after{
  content:none!important;
  display:none!important;
}

#unifiedTopbar .header-profile-copy{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  justify-content:center!important;
  min-width:0!important;
}

#unifiedTopbar .header-icon-btn,
#unifiedTopbar .unified-theme-btn.icon-only,
#unifiedTopbar #themeToggle{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  padding:0!important;
  line-height:1!important;
  vertical-align:middle!important;
}

/* Topnav icon centering fix */
#unifiedTopbar .topnav-link{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  line-height:1!important;
}

#unifiedTopbar .topnav-link .header-nav-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:14px!important;
  height:14px!important;
  flex-shrink:0!important;
  line-height:1!important;
}

#unifiedTopbar .topnav-link .header-nav-icon svg{
  display:block!important;
  width:14px!important;
  height:14px!important;
}

/* Account exact match with var/maket.htm (priority block) */
body.profile-v2-active #pageContent{
  padding:20px 26px 44px!important;
}

body.profile-v2-active .account-v2-page.account-v3-page{
  max-width:1120px!important;
  margin:0 auto!important;
  gap:20px!important;
}

body.profile-v2-active .profile-motion-item{
  opacity:0;
  transform:translateY(20px);
  animation:profileMotionIn .46s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay:var(--pm-delay,0ms);
}

@keyframes profileMotionIn{
  to{
    opacity:1;
    transform:translateY(0);
  }
}

body.profile-v2-active .account-v2-header{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  background:var(--bg)!important;
  gap:18px!important;
  padding-top:0!important;
  padding-bottom:8px!important;
  border-bottom:1px solid rgba(148,163,184,.25)!important;
}

body.profile-v2-active .account-v2-header::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1px;
  background:transparent;
  pointer-events:none;
}

body.profile-v2-active .account-v2-title-icon.account-v3-title-icon{
  width:44px!important;
  height:44px!important;
  border-radius:16px!important;
}

body.profile-v2-active .account-v2-title-main{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  min-width:0!important;
}

body.profile-v2-active .account-v2-title-wrap h1{
  margin:0!important;
  font-size:30px!important;
  font-weight:800!important;
  line-height:1.05!important;
  letter-spacing:-.02em!important;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;
  color:#0f172a!important;
}

body.profile-v2-active .account-v2-title-wrap p{
  margin:4px 0 0!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.25!important;
  letter-spacing:-.01em!important;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;
  color:#8091ad!important;
}

body.profile-v2-active .account-v2-stats-card{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:0!important;
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  border-radius:20px!important;
  padding:12px 14px!important;
  min-width:min(460px,100%)!important;
  box-shadow:0 2px 4px rgba(15,23,42,.03)!important;
}

body.profile-v2-active .account-v2-stat-cell{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  padding:0 14px!important;
  border-right:1px solid #eef2f7!important;
}

body.profile-v2-active .account-v2-stat-cell:last-child{
  border-right:0!important;
}

body.profile-v2-active .account-v2-stat-cell span{
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.16em!important;
  color:#94a3b8!important;
  text-transform:uppercase!important;
}

body.profile-v2-active .account-v2-stat-cell b{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  font-size:16px!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}

body.profile-v2-active .account-v2-stat-cell b svg{
  width:16px!important;
  height:16px!important;
  flex-shrink:0!important;
}

body.profile-v2-active .account-v2-action-row{
  gap:16px!important;
}

body.profile-v2-active .account-v2-action-row h2{
  margin:0!important;
  font-size:20px!important;
  line-height:1!important;
  letter-spacing:-.03em!important;
  font-weight:900!important;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;
  color:#0f172a!important;
}

body.profile-v2-active .account-v3-hrow i{
  height:16px!important;
  padding:0 6px!important;
  font-size:8px!important;
  border-radius:4px!important;
  letter-spacing:.08em!important;
}

body.profile-v2-active .account-v2-action-row p{
  margin:5px 0 0!important;
  font-size:14px!important;
  font-weight:600!important;
  line-height:1.3!important;
  letter-spacing:-.01em!important;
  font-family:Inter,ui-sans-serif,system-ui,sans-serif!important;
  color:#425b7f!important;
}

body.profile-v2-active .account-v2-save-btn{
  height:48px!important;
  padding:0 24px!important;
  border-radius:16px!important;
  font-size:12px!important;
  font-weight:900!important;
  letter-spacing:.04em!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  background:#2563eb!important;
  border:1px solid #2563eb!important;
  box-shadow:0 16px 32px -18px rgba(37,99,235,.9)!important;
  transition:background-color .18s ease,border-color .18s ease,transform .12s ease,box-shadow .18s ease!important;
}

body.profile-v2-active .account-v2-save-btn:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  box-shadow:0 18px 34px -20px rgba(37,99,235,.8)!important;
}

body.profile-v2-active .account-v2-save-btn:active{
  transform:scale(.95)!important;
}

body.profile-v2-active .account-v2-save-btn .save-ico{
  width:16px!important;
  height:16px!important;
  flex-shrink:0!important;
  transition:transform .2s ease!important;
}

body.profile-v2-active .account-v2-save-btn:hover .save-ico{
  transform:scale(1.1)!important;
}

body.profile-v2-active .account-v2-save-btn .save-ico-spin{
  width:16px!important;
  height:16px!important;
  border:2px solid rgba(255,255,255,.38)!important;
  border-top-color:#fff!important;
  border-radius:50%!important;
  display:inline-block!important;
  animation:profileSaveSpin .9s linear infinite!important;
}

@keyframes profileSaveSpin{
  to{transform:rotate(360deg)}
}

body.profile-v2-active .account-v2-grid{
  gap:18px!important;
  grid-template-columns:minmax(250px,.9fr) minmax(360px,1.3fr)!important;
}

body.profile-v2-active .account-v2-left-col{
  gap:18px!important;
}

body.profile-v2-active .account-v2-card{
  border-radius:34px!important;
  transition:box-shadow .35s ease,transform .35s ease!important;
}

body.profile-v2-active .account-v2-card:hover{
  box-shadow:0 24px 48px -20px rgba(15,23,42,.08)!important;
}

body.profile-v2-active .account-v2-card-head{
  padding:18px 24px!important;
  background:#f8fafc99!important;
}

body.profile-v2-active .account-v2-card-head h3{
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.2em!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}

body.profile-v2-active .account-v3-head-ico{
  width:28px!important;
  height:28px!important;
  border-radius:11px!important;
}

body.profile-v2-active .account-v2-avatar-wrap{
  padding:24px!important;
  gap:12px!important;
}

body.profile-v2-active .account-v2-avatar-stack{
  position:relative!important;
  width:min(280px,100%)!important;
}

body.profile-v2-active .account-v2-avatar-preview{
  width:min(280px,100%)!important;
  border-width:10px!important;
  border-radius:48px!important;
  transition:transform .5s ease,box-shadow .5s ease!important;
}

body.profile-v2-active .account-v2-avatar-stack:hover .account-v2-avatar-preview{
  transform:scale(1.02)!important;
  box-shadow:0 30px 50px -24px rgba(59,130,246,.35)!important;
}

body.profile-v2-active .account-v2-avatar-actions{
  position:absolute!important;
  right:-8px!important;
  bottom:-8px!important;
  margin-top:0!important;
  gap:10px!important;
  transform:translateZ(0)!important;
  transition:none!important;
}

body.profile-v2-active .account-v2-avatar-stack:hover .account-v2-avatar-actions{
  transform:translateZ(0)!important;
}

body.profile-v2-active .profile-icon-btn{
  width:44px!important;
  height:44px!important;
  border-radius:18px!important;
  background:#ffffff!important;
  border:1px solid #e2e8f0!important;
  color:#64748b!important;
  opacity:1!important;
  filter:none!important;
  box-shadow:0 10px 26px -18px rgba(15,23,42,.35)!important;
  transition:transform .2s cubic-bezier(.22,1,.36,1),background-color .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease!important;
  will-change:transform!important;
}

body.profile-v2-active .profile-icon-btn:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 14px 30px -18px rgba(15,23,42,.28)!important;
}

body.profile-v2-active .profile-icon-btn.danger:hover{
  background:#ffffff!important;
  border-color:#fecaca!important;
  color:#ef4444!important;
  transform:translateY(-1px)!important;
  box-shadow:0 14px 28px -18px rgba(239,68,68,.4)!important;
}

body.profile-v2-active .profile-icon-btn.danger:hover svg{
  transform:none!important;
}

body.profile-v2-active .profile-icon-btn.primary{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
  box-shadow:0 14px 30px -18px rgba(37,99,235,.55)!important;
}

body.profile-v2-active .profile-icon-btn.primary:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
  box-shadow:0 16px 32px -18px rgba(37,99,235,.62)!important;
}

body.profile-v2-active .profile-icon-btn:active{
  transform:scale(.9)!important;
}

body.profile-v2-active .account-v2-avatar-note{
  font-size:10px!important;
  letter-spacing:.16em!important;
}

body.profile-v2-active .account-v2-readonly-list{
  padding:18px 20px 20px!important;
  gap:10px!important;
}

body.profile-v2-active .account-v2-readonly{
  border-radius:20px!important;
  padding:14px 16px!important;
  gap:7px!important;
  transition:border-color .25s ease,background .25s ease,box-shadow .25s ease!important;
}

body.profile-v2-active .account-v2-readonly:hover{
  border-color:#cbd5e1!important;
  background:#fff!important;
  box-shadow:0 10px 24px -18px rgba(15,23,42,.24)!important;
}

body.profile-v2-active .account-v2-readonly span{
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.16em!important;
}

body.profile-v2-active .account-v2-readonly b{
  font-size:16px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:-.02em!important;
}

body.profile-v2-active .account-v2-main-card .account-v2-form-grid{
  padding:26px 28px 30px!important;
  gap:20px!important;
}

body.profile-v2-active .account-v2-field{
  gap:8px!important;
}

body.profile-v2-active .account-v2-field span{
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.2em!important;
}

body.profile-v2-active .account-v2-field input{
  height:54px!important;
  border-radius:18px!important;
  padding:0 18px!important;
  font-size:16px!important;
  font-weight:700!important;
  letter-spacing:-.01em!important;
  line-height:1.25!important;
}

body.profile-v2-active .account-v2-sync-btn{
  height:26px!important;
  padding:0 10px!important;
  border-radius:8px!important;
  font-size:9px!important;
  letter-spacing:.08em!important;
  font-weight:900!important;
}

body.profile-v2-active .account-v2-notice{
  margin-top:8px!important;
  border-radius:26px!important;
  padding:16px 18px!important;
  grid-template-columns:42px 1fr!important;
  gap:12px!important;
  position:relative!important;
  overflow:hidden!important;
}

body.profile-v2-active .account-v2-notice-watermark{
  position:absolute!important;
  top:-12px!important;
  right:-8px!important;
  opacity:.04!important;
  color:#1e3a8a!important;
  transition:opacity .25s ease!important;
}

body.profile-v2-active .account-v2-notice:hover .account-v2-notice-watermark{
  opacity:.06!important;
}

body.profile-v2-active .account-v2-notice-icon{
  width:40px!important;
  height:40px!important;
  border-radius:12px!important;
  z-index:1!important;
  transition:transform .25s ease!important;
}

body.profile-v2-active .account-v2-notice:hover .account-v2-notice-icon{
  transform:scale(1.08)!important;
}

body.profile-v2-active .account-v2-notice-copy{
  position:relative!important;
  z-index:1!important;
}

body.profile-v2-active .account-v2-notice strong{
  font-size:14px!important;
  font-weight:900!important;
  letter-spacing:-.01em!important;
}

body.profile-v2-active .account-v2-notice p{
  font-size:12px!important;
  line-height:1.45!important;
  font-weight:700!important;
}

@media(max-width:1100px){
  body.profile-v2-active #pageContent{padding:14px 12px 34px!important}
  body.profile-v2-active .account-v2-grid{grid-template-columns:1fr!important}
  body.profile-v2-active .account-v2-title-wrap h1{font-size:28px!important}
  body.profile-v2-active .account-v2-title-wrap p{font-size:13px!important}
  body.profile-v2-active .account-v2-stats-card{min-width:100%!important}
  body.profile-v2-active .account-v2-action-row h2{font-size:20px!important}
  body.profile-v2-active .account-v2-action-row p{font-size:13px!important}
  body.profile-v2-active .account-v2-save-btn{height:46px!important;font-size:11px!important}
}

@media(max-width:700px){
  body.profile-v2-active .account-v2-page.account-v3-page{gap:16px!important}
  body.profile-v2-active #main{
    height:calc(100dvh - 56px)!important;
  }
  body.profile-v2-active #pageContent{
    padding-top:calc(58px + 12px)!important;
  }
  body.profile-v2-active .account-v2-header{
    top:auto!important;
    padding-top:0!important;
  }
  body.profile-v2-active .account-v2-stats-card{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.profile-v2-active .account-v2-stat-cell{
    border-right:0!important;
    border-bottom:1px solid #eef2f7!important;
    padding:0 0 10px!important;
  }
  body.profile-v2-active .account-v2-stat-cell:last-child{
    border-bottom:0!important;
    padding-bottom:0!important;
  }
  body.profile-v2-active .account-v2-action-row h2{font-size:24px!important}
  body.profile-v2-active .account-v2-action-row p{font-size:14px!important;line-height:1.25!important}
  body.profile-v2-active .account-v2-save-btn{width:100%!important}
  body.profile-v2-active .account-v2-field input{
    height:54px!important;
    font-size:14px!important;
    border-radius:18px!important;
    padding:0 18px!important;
  }
  body.profile-v2-active .account-v3-hrow i{
    height:15px!important;
    padding:0 6px!important;
    font-size:8px!important;
  }
  body.profile-v2-active .account-v2-readonly b{font-size:15px!important}
  body.profile-v2-active .account-v2-notice strong{font-size:13px!important}
  body.profile-v2-active .account-v2-notice p{font-size:12px!important}
}

/* Security page ported from the profile settings mockup */
body.security-page-active #sectionMetricsBar,
body.security-page-active .section-metrics-bar,
body.security-page-active .page-hero,
body.security-page-active .section-toolbar{
  display:none!important;
}

/* Subscription page uses the same full-view shell as Security/API pages. */
body.subscription-page-active #sectionMetricsBar,
body.subscription-page-active .section-metrics-bar,
body.subscription-page-active .page-hero,
body.subscription-page-active .section-toolbar{
  display:none!important;
}

body.security-page-active #sectionMetricsBar,
body.security-page-active .section-metrics-bar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
}

body.subscription-page-active #sectionMetricsBar,
body.subscription-page-active .section-metrics-bar{
  display:none!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
}

body.security-page-active{
  grid-template-rows:56px 0 minmax(0,1fr)!important;
}

body.subscription-page-active{
  grid-template-rows:56px 0 minmax(0,1fr)!important;
}

body.security-page-active #main{
  height:calc(100vh - 56px)!important;
}

body.subscription-page-active #main{
  height:calc(100vh - 56px)!important;
  overflow:hidden!important;
}

body.security-page-active .content-shell{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}

body.subscription-page-active .content-shell{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}

body.security-page-active #pageContent{
  background:#f8fafc!important;
  color:#0f172a!important;
  padding:20px 26px 44px!important;
}

body.subscription-page-active #pageContent{
  background:#f8fafc!important;
  color:#0f172a!important;
  padding:0!important;
  height:100%!important;
}

body.subscription-page-active .sub-embed-frame{
  display:block!important;
  width:100%!important;
  height:calc(100vh - 56px)!important;
  min-height:calc(100vh - 56px)!important;
  border:0!important;
  border-radius:0!important;
  background:#f8fafc!important;
}

/* Keep horizontal gutters identical on profile/security pages. */
body.profile-v2-active #pageContent,
body.security-page-active #pageContent{
  padding-left:26px!important;
  padding-right:26px!important;
}

.mksec-page{
  max-width:1120px!important;
  width:100%;
  margin:0 auto!important;
  display:flex;
  flex-direction:column;
  gap:24px;
  font-family:Inter,system-ui,sans-serif;
}

body.security-page-active .mksec-motion-item{
  opacity:0;
  transform:translateY(20px);
  animation:profileMotionIn .46s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay:var(--pm-delay,0ms);
}

.mksec-header{
  padding-bottom:22px;
  border-bottom:1px solid rgba(226,232,240,.85);
}

.mksec-title-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.mksec-title-main{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.mksec-title-icon{
  width:44px;
  height:44px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#2563eb;
  border-radius:18px;
  box-shadow:0 18px 34px -22px rgba(37,99,235,.8);
  transition:transform .25s ease;
}

.mksec-title-icon svg{
  width:26px;
  height:26px;
}

.mksec-title-icon:hover{
  transform:rotate(3deg);
}

.mksec-title-main h1{
  margin:0;
  font-size:30px;
  line-height:1;
  font-weight:900;
  letter-spacing:0;
  color:#0f172a;
}

.mksec-title-main p{
  margin:7px 0 0;
  font-size:13px;
  line-height:1.25;
  font-weight:800;
  color:#94a3b8;
}

.mksec-stats-card{
  display:grid;
  grid-template-columns:repeat(4,minmax(104px,1fr));
  align-items:center;
  gap:0;
  min-width:min(620px,100%);
  padding:18px 20px;
  background:#fff;
  border:1px solid rgba(226,232,240,.9);
  border-radius:24px;
  box-shadow:0 16px 38px -30px rgba(15,23,42,.32);
}

.mksec-stat-cell{
  min-width:0;
  padding:0 16px;
  border-right:1px solid #eef2f7;
}

.mksec-stat-cell:first-child{
  padding-left:0;
}

.mksec-stat-cell:last-child{
  padding-right:0;
  border-right:0;
}

.mksec-stat-cell span{
  display:block;
  font-size:9px;
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#94a3b8;
  white-space:nowrap;
}

.mksec-stat-cell b{
  margin-top:7px;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  font-size:13px;
  line-height:1.1;
  font-weight:900;
  color:#334155;
  white-space:nowrap;
}

.mksec-stat-cell b svg{
  width:18px;
  height:18px;
  flex:0 0 auto;
}

.mksec-stat-cell b.up{color:#10b981}
.mksec-stat-cell b.brd{color:#2563eb}

.mksec-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:20px;
  background:#ecfdf5;
  border:1px solid #bbf7d0;
  border-radius:24px;
  overflow:hidden;
}

.mksec-banner-left{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.mksec-banner-ico{
  width:48px;
  height:48px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#10b981;
  border-radius:16px;
  box-shadow:0 18px 30px -22px rgba(16,185,129,.8);
}

.mksec-banner-ico svg{
  width:22px;
  height:22px;
}

.mksec-banner-copy{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}

.mksec-banner-copy b{
  font-size:14px;
  line-height:1.1;
  font-weight:900;
  color:#064e3b;
}

.mksec-banner-copy span{
  font-size:11px;
  line-height:1.35;
  font-weight:800;
  color:rgba(6,78,59,.68);
}

.mksec-small-btn,
.mksec-mini-danger,
.mksec-primary-btn,
.mksec-secondary-btn,
.mksec-danger-btn{
  border:0;
  cursor:pointer;
  font-family:inherit;
  letter-spacing:0;
  transition:transform .18s ease,background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease;
}

.mksec-small-btn{
  height:40px;
  padding:0 20px;
  flex:0 0 auto;
  color:#334155;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  font-size:10px;
  font-weight:900;
  box-shadow:0 12px 26px -22px rgba(15,23,42,.3);
}

.mksec-small-btn:hover{
  transform:translateY(-1px);
  border-color:#cbd5e1;
}

.mksec-card{
  background:#fff;
  border:1px solid rgba(226,232,240,.9);
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 18px 48px -38px rgba(15,23,42,.34);
}

.mksec-card-head{
  min-height:62px;
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid #f1f5f9;
  background:rgba(248,250,252,.55);
}

.mksec-card-head h3{
  margin:0;
  display:flex;
  align-items:center;
  gap:9px;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.04em;
  color:#1e293b;
}

.mksec-card-head-ico{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#2563eb;
}

.mksec-card-head-ico svg{
  width:18px;
  height:18px;
}

.mksec-card-body{
  padding:18px 22px 22px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.mksec-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:74px;
  padding:16px;
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:18px;
}

.mksec-toggle-copy{
  min-width:0;
}

.mksec-toggle-copy b{
  display:block;
  font-size:13px;
  line-height:1.1;
  font-weight:900;
  color:#1e293b;
}

.mksec-toggle-copy span{
  display:block;
  margin-top:7px;
  font-size:11px;
  line-height:1.35;
  font-weight:800;
  color:#94a3b8;
}

.mksec-switch{
  width:44px;
  height:24px;
  flex:0 0 auto;
  padding:0;
  position:relative;
  border:0;
  border-radius:999px;
  background:#cbd5e1;
  cursor:pointer;
  transition:background .22s ease,box-shadow .22s ease;
}

.mksec-switch i{
  position:absolute;
  top:4px;
  left:4px;
  width:16px;
  height:16px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 4px 10px rgba(15,23,42,.16);
  transition:transform .22s cubic-bezier(.22,1,.36,1);
}

.mksec-switch.is-on{
  background:#10b981;
  box-shadow:0 10px 20px -16px rgba(16,185,129,.9);
}

.mksec-switch.is-on i{
  transform:translateX(20px);
}

.mksec-mini-danger{
  height:26px;
  padding:0 10px;
  flex:0 0 auto;
  color:#e11d48;
  background:#fff1f2;
  border-radius:10px;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
}

.mksec-mini-danger:hover{
  background:#ffe4e6;
  transform:translateY(-1px);
}

.mksec-sessions-body{
  gap:0;
}

.mksec-session{
  padding:0 18px;
  margin:0 -18px;
  border:1px solid transparent;
  border-radius:16px;
  transition:background .18s ease,border-color .18s ease;
}

.mksec-session.is-current{
  background:#eff6ff;
  border:1px solid #dbeafe;
}

.mksec-session:hover{
  background:#f8fbff;
  border-color:#e2e8f0;
}

.mksec-session:hover .mksec-session-icon{
  color:#2563eb;
  background:#eff6ff;
}

.mksec-session:hover .mksec-session-title-row b{
  color:#0f172a;
}

.mksec-session:hover .mksec-session-copy>span{
  color:#64748b;
}

.mksec-session.is-current:hover{
  background:#eaf2ff;
  border-color:#bfdbfe;
}

.mksec-session.is-current:hover .mksec-session-icon{
  color:#fff;
  background:#1d4ed8;
}

.mksec-session-main{
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid #f1f5f9;
  cursor:pointer;
}

.mksec-session-main:focus-visible{
  outline:2px solid #93c5fd;
  outline-offset:2px;
  border-radius:12px;
}

.mksec-session:last-child .mksec-session-main{
  border-bottom:0;
}

.mksec-session-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

.mksec-session-icon{
  width:34px;
  height:34px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#94a3b8;
  background:#f8fafc;
  border-radius:12px;
}

.mksec-session-icon svg{
  width:18px;
  height:18px;
}

.mksec-session.is-current .mksec-session-icon{
  color:#fff;
  background:#2563eb;
  box-shadow:0 14px 24px -18px rgba(37,99,235,.8);
}

.mksec-session-copy{
  min-width:0;
}

.mksec-session-title-row{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.mksec-session-title-row b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  color:#1e293b;
}

.mksec-session.is-current .mksec-session-title-row b{
  color:#1e3a8a;
}

.mksec-session-title-row span,
.mksec-session-copy>span{
  display:block;
  margin-top:5px;
  font-size:10px;
  line-height:1.2;
  font-weight:800;
  color:#94a3b8;
}

.mksec-session.is-current .mksec-session-copy>span{
  color:rgba(37,99,235,.72);
}

.mksec-session-more,
.mksec-delete-btn,
.mksec-modal-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  background:transparent;
  cursor:pointer;
  color:#94a3b8;
}

.mksec-session-more{
  width:22px;
  height:22px;
  border-radius:8px;
  transition:transform .2s ease,background .15s ease,color .15s ease;
}

.mksec-session-more:hover{
  background:#f1f5f9;
  color:#2563eb;
}

.mksec-session.is-expanded .mksec-session-more{
  transform:rotate(180deg);
}

.mksec-session-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.mksec-current-badge{
  display:inline-flex;
  align-items:center;
  height:24px;
  padding:0 9px;
  color:#2563eb;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:8px;
  font-size:8px;
  font-weight:900;
  letter-spacing:.1em;
}

.mksec-delete-btn{
  width:34px;
  height:34px;
  border-radius:12px;
  opacity:.5;
}

.mksec-delete-btn:hover{
  opacity:1;
  color:#e11d48;
  background:#fff1f2;
}

.mksec-session-detail{
  margin:0 0 14px 46px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:9px;
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:14px;
}

.mksec-session-detail.is-current{
  background:#eff6ff;
  border-color:#dbeafe;
}

.mksec-session-detail-wrap{
  overflow:hidden;
  max-height:0;
  opacity:0;
  transform:translateY(-4px);
  transition:max-height .26s ease,opacity .22s ease,transform .22s ease;
}

.mksec-session-detail-wrap.is-open{
  max-height:420px;
  opacity:1;
  transform:translateY(0);
}

.mksec-session-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-width:0;
}

.mksec-session-meta-row span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#94a3b8;
}

.mksec-session-meta-row b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
  font-weight:900;
  color:#475569;
}

.mksec-modal-overlay{
  position:fixed;
  inset:0;
  z-index:1100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(10px);
}

.mksec-modal-overlay[hidden]{
  display:none!important;
}

.mksec-modal{
  width:min(432px,100%);
  overflow:hidden;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:28px;
  box-shadow:0 40px 90px -50px rgba(15,23,42,.65);
}

.mksec-modal-head{
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 22px;
  background:#f8fafc;
  border-bottom:1px solid #f1f5f9;
}

.mksec-warn-modal .mksec-modal-head{
  background:#fff1f2;
}

.mksec-modal-title-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.mksec-modal-title-wrap h3{
  margin:0;
  font-size:12px;
  line-height:1.1;
  font-weight:900;
  color:#1e293b;
  text-transform:uppercase;
}

.mksec-modal-ico{
  width:36px;
  height:36px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#2563eb;
  border-radius:13px;
}

.mksec-modal-ico.ok{
  background:#10b981;
}

.mksec-modal-ico.warn{
  background:#e11d48;
}

.mksec-modal-close{
  width:34px;
  height:34px;
  border-radius:12px;
}

.mksec-modal-close:hover{
  background:#e2e8f0;
  color:#0f172a;
}

.mksec-modal-body{
  padding:28px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.mksec-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.mksec-field span{
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
  color:#64748b;
}

.mksec-input{
  width:100%;
  height:50px;
  padding:0 16px;
  color:#0f172a;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:16px;
  font-size:14px;
  font-weight:800;
  outline:none;
}

.mksec-input:focus,
.mksec-code-inputs input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.1);
}

.mksec-code-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  text-align:center;
}

.mksec-code-title{
  font-size:14px;
  font-weight:900;
  color:#1e293b;
}

.mksec-code-sub{
  margin-top:-7px;
  font-size:11px;
  font-weight:800;
  color:#64748b;
}

.mksec-code-inputs{
  display:grid;
  grid-template-columns:repeat(6,40px);
  gap:8px;
  justify-content:center;
}

.mksec-code-inputs input{
  width:40px;
  height:48px;
  text-align:center;
  color:#0f172a;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  font-size:18px;
  font-weight:900;
  outline:none;
}

.mksec-primary-btn,
.mksec-secondary-btn,
.mksec-danger-btn{
  min-height:48px;
  padding:0 18px;
  border-radius:18px;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.mksec-primary-btn{
  color:#fff;
  background:#2563eb;
  box-shadow:0 18px 34px -24px rgba(37,99,235,.8);
}

.mksec-primary-btn:hover{
  background:#1d4ed8;
}

.mksec-primary-btn:disabled{
  opacity:.72;
  cursor:wait;
}

.mksec-secondary-btn{
  color:#64748b;
  background:#f1f5f9;
}

.mksec-danger-btn{
  color:#fff;
  background:#e11d48;
  box-shadow:0 18px 34px -24px rgba(225,29,72,.7);
}

.mksec-danger-btn:hover{
  background:#be123c;
}

.mksec-modal-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.mksec-warn-copy{
  padding:22px;
  color:#334155;
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:20px;
  text-align:center;
  font-size:14px;
  line-height:1.5;
  font-weight:800;
}

.mksec-warn-hint{
  text-align:center;
  color:#2563eb;
  background:#eff6ff;
  border-radius:12px;
  padding:10px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.mksec-success-body{
  align-items:center;
  text-align:center;
}

.mksec-success-ico{
  width:72px;
  height:72px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#10b981;
  background:#ecfdf5;
  border:1px solid #bbf7d0;
  border-radius:999px;
}

.mksec-success-body h4{
  margin:0;
  font-size:20px;
  font-weight:900;
  color:#0f172a;
}

.mksec-success-body p{
  margin:0;
  font-size:13px;
  line-height:1.45;
  font-weight:700;
  color:#64748b;
}

.mksec-spin{
  display:inline-block;
  width:13px;
  height:13px;
  margin-right:8px;
  vertical-align:-2px;
  border:2px solid rgba(255,255,255,.45);
  border-top-color:#fff;
  border-radius:50%;
  animation:mksec-spin .8s linear infinite;
}

@keyframes mksec-spin{
  to{transform:rotate(360deg)}
}

@media(max-width:1100px){
  body.profile-v2-active #pageContent,
  body.security-page-active #pageContent{
    padding-left:12px!important;
    padding-right:12px!important;
  }
  body.security-page-active #pageContent{padding:14px 12px 34px!important}
  .mksec-title-wrap{flex-direction:column;align-items:stretch}
  .mksec-stats-card{min-width:0;width:100%}
}

@media(max-width:760px){
  body.security-page-active #main,
  body.subscription-page-active #main{
    height:calc(100dvh - 56px)!important;
    margin-top:0!important;
    padding:0!important;
  }
  body.security-page-active #pageContent{padding-top:calc(58px + 12px)!important}
  body.subscription-page-active #pageContent{padding-top:0!important}
  body.subscription-page-active .sub-embed-frame{
    height:calc(100dvh - 56px)!important;
    min-height:calc(100dvh - 56px)!important;
  }
  .mksec-page{gap:16px}
  .mksec-header{padding-bottom:16px}
  .mksec-title-main h1{font-size:26px}
  .mksec-title-main p{font-size:12px}
  .mksec-stats-card{grid-template-columns:1fr;gap:10px;padding:16px}
  .mksec-stat-cell{border-right:0;border-bottom:1px solid #eef2f7;padding:0 0 10px}
  .mksec-stat-cell:last-child{border-bottom:0;padding-bottom:0}
  .mksec-banner{align-items:stretch;flex-direction:column}
  .mksec-small-btn{width:100%}
  .mksec-card-head{align-items:flex-start;flex-direction:column}
  .mksec-mini-danger{height:30px}
  .mksec-toggle-row{align-items:flex-start}
  .mksec-session-main{align-items:flex-start;padding:16px 0}
  .mksec-session-detail{margin-left:0}
  .mksec-session-meta-row{align-items:flex-start;flex-direction:column;gap:4px}
  .mksec-modal-body{padding:22px}
  .mksec-code-inputs{grid-template-columns:repeat(6,minmax(0,1fr));width:100%;gap:6px}
  .mksec-code-inputs input{width:100%;min-width:0}
  .mksec-modal-actions{grid-template-columns:1fr}
}
