
/* ARK_UI_CONSISTENCY_V33 */

:root{
  --ark33-ui-font:'Be Vietnam Pro',
    system-ui,-apple-system,'Segoe UI',sans-serif;
}

body{
  font-family:var(--ark33-ui-font);
}

:where(button,input,select,textarea,label){
  font-family:var(--ark33-ui-font);
}

:where(
  .CodeMirror,
  .CodeMirror *,
  #nbCode,
  #nbOutput,
  #v9Editor,
  #v9Out,
  pre,code,kbd
){
  font-family:'JetBrains Mono',Consolas,ui-monospace,monospace;
}

/* Navbar cố định khi cuộn */

body:has(#app)>header.top{
  position:sticky!important;
  top:0!important;
  z-index:800!important;
  background:var(--bg,#0b0b0c)!important;
  border-bottom:1px solid var(--line,#2f2a2b)!important;
  padding:10px 14px!important;
  margin:-18px -20px 16px!important;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  max-width:calc(100% + 40px);
}

body:has(#app)>header.top #tabs{
  min-width:0;
  display:flex;
  flex-wrap:nowrap;
  overflow-x:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--accent,#e11d2e) transparent;
}

body:has(#app)>header.top #tabs::-webkit-scrollbar{
  height:4px;
}

body:has(#app)>header.top #tabs::-webkit-scrollbar-button{
  display:none;
}

body:has(#app)>header.top #tabs>button{
  white-space:nowrap;
  flex:none;
  font:600 13px/1.4 var(--ark33-ui-font);
}

@media(max-width:760px){
  body:has(#app)>header.top{
    margin:-18px -20px 12px!important;
    flex-wrap:wrap!important;
    padding:9px 12px!important;
  }

  body:has(#app)>header.top #tabs{
    width:100%;
    max-width:100%;
    order:5;
  }
}

/* Bỏ tiêu đề tổng quan bị trùng */

#app>#arkAdminPageTopV3{
  min-height:0!important;
  margin:0 0 8px!important;
  padding:0!important;
  border:0!important;
}

#arkAdminPageTopV3 .ark-top-title,
#v-overview>.ark-admin-page-heading{
  display:none!important;
}

/* Chỉ giữ bảng tài khoản hợp nhất */

#v-users #arkAccountPanel,
#v-users #arkAccountLockPanel{
  display:none!important;
}

/* Font và kích thước điều khiển */

#app :where(button,input,select,label){
  font-size:13px;
  line-height:1.45;
}

#app h2{
  font-size:18px;
  line-height:1.45;
}

#app h3{
  font-size:14px;
  line-height:1.45;
}

#app :where(.msg,.hint,.ark-uu-sub){
  font-size:13px;
  line-height:1.6;
}

/* Editor cuộn riêng */

#v9Editor{
  max-height:min(65vh,680px);
  overflow:auto;
}

#v9Out{
  max-height:min(38vh,420px);
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

/* Nút trở lên đầu trang */

#ark33ScrollTop{
  position:fixed;
  right:22px;
  bottom:102px;
  z-index:1300;
  width:42px;
  height:42px;
  border:1px solid var(--accent,#e11d2e);
  border-radius:12px;
  background:var(--surface,#18181b);
  color:var(--ink,#fff);
  box-shadow:0 8px 28px rgba(0,0,0,.34);
  display:grid;
  place-items:center;
  cursor:pointer;
  opacity:.88;
  padding:0;
  transition:transform .15s,opacity .15s;
}

#ark33ScrollTop svg{
  width:20px;
  height:20px;
  display:block;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#ark33ScrollTop:hover{
  opacity:1;
  transform:translateY(-3px);
}

#ark33ScrollTop:focus-visible{
  outline:2px solid var(--accent,#e11d2e);
  outline-offset:3px;
}

@media(max-width:650px){
  #ark33ScrollTop{
    right:12px;
    bottom:85px;
    width:38px;
    height:38px;
  }
}

@media print{
  #ark33ScrollTop{
    display:none!important;
  }
}

@media(prefers-reduced-motion:reduce){
  #ark33ScrollTop{
    transition:none;
  }
}
