/* Bảng admin ẩn (js/ext_admin.js, js/ext_admin_tools.js) — cùng bộ kit.css: .btn / .tab / .card */
.win.win-admin { width: min(900px, 96vw); left: 50%; right: auto; top: 60px; transform: translateX(-50%); }
.win.win-admin { max-height: none; }
.win-admin .win-body { padding: 8px; max-height: none; overflow: hidden; }
.adm2 { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; height: min(600px, calc(100vh - 130px)); }
.adm-side { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; }
.adm-main { display: flex; flex-direction: column; min-height: 0; }
.adm-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.adm-tabs { display: flex; flex-wrap: nowrap; }
.win .adm-tabs .tab { padding: 4px 9px 5px; white-space: nowrap; }
.adm .card, .adm2 .card { margin: 0; }
.adm-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.adm-h > b { font-family: var(--f-head); font-size: 14px; }
.adm-dim { opacity: .65; font-size: 11px; }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 5px 0; }
.adm-l { flex: 0 0 auto; font-weight: 700; }
.adm-r { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.adm-in { width: 64px; padding: 3px 6px; font: inherit; border: 2px solid var(--ink); border-radius: 8px; background: #fffdf6; }
.adm-in.w { width: 110px; } .adm-in.w2 { width: 200px; }
.adm-v { min-width: 44px; text-align: center; font-weight: 700; }
.adm2 input[type=range] { width: 160px; accent-color: var(--sky-d); }
.adm2 .btn, .adm2 button.btn { padding: 3px 9px; font-size: 12px; }

/* sân khấu nhân vật */
.adm-stage { position: relative; height: 200px; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #2e3c6a 0%, #151a33 60%, #0c0f20 100%); }
.adm-stage::before { content: ''; position: absolute; top: 14px; right: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fffbe6, #f2e3a8 60%, #d8c27a); box-shadow: 0 0 24px #ffeeb0aa; }
.adm-stage canvas { position: relative; display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.adm-stage-name { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; color: #f4ead8; font: 700 12px var(--f-head); text-shadow: 0 1px 0 #000; }
.adm-sum b { display: block; font-size: 15px; } .adm-sum > small { opacity: .8; }
.adm-sum-g { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin-top: 6px; font-size: 12px; }
.adm-sum-g span { opacity: .7; } .adm-sum-g b { display: inline; font-size: 12px; text-align: right; }
.adm-snaps .adm-h { justify-content: space-between; }
.adm-snap { display: flex; gap: 4px; margin: 3px 0; }
.adm-snap .btn:first-child { flex: 1; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* chỉ số */
.adm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; }
.adm-stat { display: flex; align-items: center; gap: 4px; }
.adm-stat b { width: 34px; } .adm-stat span { min-width: 26px; text-align: center; font-weight: 700; }

/* cây nghề */
.adm-tree { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.adm-tcols { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.adm-tcol { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 3px solid var(--ink); }
.adm-tbr { display: flex; flex-direction: column; gap: 3px; padding-left: 6px; border-left: 2px dashed rgba(0, 0, 0, .3); }
.adm-tleaf { display: flex; flex-direction: column; gap: 3px; padding-left: 6px; }
.adm2 .adm-job { display: flex; align-items: center; gap: 4px; width: 100%; padding: 3px 5px; font-size: 11px; line-height: 1.15; text-align: left;
  background: var(--cream-2); border: 2px solid var(--ink); border-radius: 8px; }
.adm2 .adm-job.t1 { background: #ffe9b8; } .adm2 .adm-job.t2 { background: #dceeff; }
.adm2 .adm-job.t3 { background: #2a2440; color: #f4ead8; border-color: var(--jc, var(--ink)); box-shadow: inset 0 0 0 1px var(--jc, transparent); }
.adm2 .adm-job.on { outline: 3px solid var(--gold-2, #ffd56a); outline-offset: 1px; }
.adm2 .adm-job:hover { transform: translateY(-1px); filter: brightness(1.08); }
.adm-job .ji { font-size: 14px; } .adm-job .jn { flex: 1; }
.adm-c3 { border-color: var(--jc); box-shadow: inset 0 0 0 2px var(--jc); }

/* kỹ năng */
.adm-slots { display: flex; gap: 6px; }
.adm2 .adm-slot { position: relative; width: 46px; height: 46px; padding: 0; display: grid; place-items: center; background: #2a2440; border: 2px solid var(--ink); border-radius: 10px; }
.adm2 .adm-slot.arm { box-shadow: 0 0 0 3px #ffd56a; }
.adm-slot kbd { position: absolute; top: -2px; left: 2px; font-size: 10px; color: #fff; text-shadow: 0 1px 0 #000; }
.adm-sks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 10px; }
.adm-sk { display: flex; align-items: center; gap: 4px; padding: 2px 4px; border-radius: 8px; opacity: .6; }
.adm-sk.on { opacity: 1; } .adm-sk.sel { background: #ffe9b8; opacity: 1; }
.adm2 .adm-ski { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.adm-skn { flex: 1; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* vật phẩm */
.adm-search { width: 200px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.adm-items { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 4px; max-height: 340px; overflow-y: auto; }
.adm2 .adm-it .ico { width: 32px; height: 32px; image-rendering: pixelated; }
.adm2 .adm-it { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 8px; }
.adm2 .adm-it.r-rare { box-shadow: inset 0 0 0 2px #5aa8ff; } .adm2 .adm-it.r-epic { box-shadow: inset 0 0 0 2px #b56aff; }
.adm2 .adm-it.r-legend { box-shadow: inset 0 0 0 2px #ffb03a; }
.adm-more { grid-column: 1 / -1; }
.adm-emo { line-height: 1; }

/* bản đồ */
.adm-maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 230px; overflow-y: auto; }
.adm2 .adm-map { display: flex; flex-direction: column; align-items: flex-start; padding: 4px 8px; text-align: left; }
.adm2 .adm-map.on { outline: 3px solid var(--gold-2, #ffd56a); }
.adm-map small { opacity: .7; font-size: 11px; }

/* công tắc */
.adm-togs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.adm2 .adm-tog { display: flex; align-items: center; gap: 8px; padding: 6px 10px; text-align: left; }
.adm-tog i { width: 30px; height: 16px; border-radius: 9px; background: #8a8170; position: relative; flex: 0 0 auto; border: 2px solid var(--ink); }
.adm-tog i::after { content: ''; position: absolute; top: 1px; left: 1px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: left .15s; }
.adm-tog.on i { background: #4ab06a; } .adm-tog.on i::after { left: 15px; }
.adm-tog b { flex: 1; } .adm-tog em { font-style: normal; font-size: 11px; opacity: .7; }

/* ô lệnh */
.adm-cmd { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #151a33; border: 2px solid var(--ink); border-radius: 10px; }
.adm-cmd span { color: #7fe0a0; font: 700 16px monospace; }
.adm-cmd input { flex: 1; border: 0; outline: 0; background: transparent; color: #e8f4ff; font: 13px monospace; }
.adm-cmd input::placeholder { color: #8090b0; }

/* thông báo nhỏ */
#adm-toast { position: fixed; top: 14px; left: 50%; transform: translate(-50%, -10px); z-index: 9999; padding: 6px 16px; border: 2px solid var(--ink, #222);
  border-radius: 12px; background: #2a5a3a; color: #eafff0; font: 700 13px var(--f-head, sans-serif); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#adm-toast.bad { background: #6a2a2a; color: #ffeaea; }
#adm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* nhuộm màu (js/ext_dye.js) */
.win-dye { width: 380px; }
.dy-row { display: flex; align-items: center; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.dy-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 8px 0; }
.win .dy-sw { width: 34px; height: 30px; padding: 0; border: 2px solid var(--ink); border-radius: 8px; }
.win .dy-sw.on { box-shadow: 0 0 0 3px #ffd56a; }
.dy-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #000; vertical-align: middle; }
