:root {
  --bg: #121418; --panel: #1a1d23; --panel2: #22262e; --panel3: #2a2f38; --line: #2e333d;
  --text: #e6e8ec; --muted: #8b919c; --green: #5fd068; --red: #ef5b5b; --yellow: #f2c14e;
  --blue: #5ab0f2; --cyan: #4fd1c5; --purple: #b794f6; --orange: #f6a04d;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, "Segoe UI", sans-serif; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
a { color: var(--blue); }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 7px 14px; border-radius: 7px; transition: .15s; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover:not(:disabled), .btn:hover { border-color: var(--muted); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.sm, .btn.sm { padding: 3px 9px; font-size: 12px; }
.green { background: #1d3a22 !important; border-color: #2f6b38 !important; color: var(--green) !important; }
.red { background: #431f1f !important; border-color: #7a3433 !important; color: var(--red) !important; }
.yellow { background: #3d3318 !important; border-color: #6e5c22 !important; color: var(--yellow) !important; }
.blue { background: #1a3247 !important; border-color: #2c5878 !important; color: var(--blue) !important; }
input, select, textarea { font: inherit; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; outline: none; }
input:focus, select:focus { border-color: var(--green); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--green); padding: 0; }

/* Công tắc */
.switch { position: relative; width: 42px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--panel3); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: #2f6b38; }
.switch input:checked + span::before { transform: translateX(19px); background: var(--green); }

/* Header */
header { display: flex; align-items: center; gap: 12px; padding: 9px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.block { width: 22px; height: 22px; background: linear-gradient(#6abe30 0 35%, #8b5a2b 35%); border-radius: 3px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 99px; background: var(--panel2); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.s-running .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.s-starting .dot, .s-stopping .dot { background: var(--yellow); animation: blink 1s infinite; }
.s-stopped .dot { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }
.controls { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.usermenu { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid var(--line); }
nav { display: flex; gap: 2px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
nav button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 10px 14px; }
nav button.active { color: var(--text); border-bottom-color: var(--green); }

main { flex: 1; min-height: 0; display: flex; }
.tab { display: none; flex: 1; min-height: 0; overflow-y: auto; }
.tab.active { display: flex; }
.page { padding: 18px; width: 100%; max-width: 1300px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }

/* Console */
#t-console { display: none; }
#t-console.active { display: grid; grid-template-columns: 1fr 290px; }
.console-wrap { display: flex; flex-direction: column; padding: 14px; gap: 10px; min-height: 0; }
#console { flex: 1; overflow-y: auto; background: #0b0d10; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: 13px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }
#console .warn { color: var(--yellow); }
#console .error { color: var(--red); }
#console .sys { color: var(--cyan); font-style: italic; }
#console .cmd { color: var(--green); }
#console .chat { color: var(--purple); }
#console .join { color: #8fe39a; }
#console .ts { color: #4f5561; margin-right: 6px; }
.cmdbox { position: relative; }
.cmdbar { display: flex; gap: 8px; }
.cmdbar .prompt { display: flex; align-items: center; color: var(--green); font: 600 16px var(--mono); }
.cmdbar input { flex: 1; font-family: var(--mono); }
#hint { font: 12px var(--mono); color: var(--muted); min-height: 18px; padding-left: 20px; margin-top: 4px; }
#hint b { color: var(--yellow); font-weight: normal; }
#suggest { position: absolute; bottom: calc(100% + 4px); left: 18px; min-width: 260px; max-width: 480px; max-height: 260px; overflow-y: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 5; font: 13px var(--mono); }
#suggest div { padding: 5px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; }
#suggest div.sel, #suggest div:hover { background: var(--panel3); color: var(--green); }
#suggest small { color: var(--muted); }

aside { border-left: 1px solid var(--line); background: var(--panel); padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.stat { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); gap: 8px; }
.stat span:last-child { font-family: var(--mono); text-align: right; }
.bar { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar div { height: 100%; background: var(--blue); transition: width .5s; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quick button { font-size: 12px; padding: 6px 8px; }
.mini-player { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.mini-player img, .head { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; background: var(--panel2); }

/* Người chơi */
.search { max-width: 280px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.pcard { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pcard .top { display: flex; gap: 10px; align-items: center; }
.pcard .head { width: 40px; height: 40px; }
.pcard .name { font-weight: 600; font-size: 15px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--panel3); color: var(--muted); }
.badge.op { background: #3d3318; color: var(--yellow); }
.badge.ban { background: #431f1f; color: var(--red); }
.badge.on { background: #1d3a22; color: var(--green); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td .row { flex-wrap: nowrap; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; grid-column: 1 / -1; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-start; justify-content: center; z-index: 30; padding: 40px 16px; overflow-y: auto; }
.modal > .box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 100%; max-width: 780px; padding: 20px; position: relative; }
.modal .close { position: absolute; right: 14px; top: 14px; }

/* Thông tin người chơi */
.pinfo { display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.pinfo .body3d { width: 150px; image-rendering: pixelated; }
.hearts, .foods { font-size: 17px; letter-spacing: 1px; line-height: 1; }
.hearts .e, .foods .e { filter: grayscale(1) brightness(.4); }
.xpbar { height: 8px; background: #1f2a12; border-radius: 4px; overflow: hidden; border: 1px solid #3a4f1d; }
.xpbar div { height: 100%; background: #7fd03b; }
.inv { display: grid; grid-template-columns: repeat(9, 52px); gap: 4px; }
.slot { width: 52px; height: 52px; background: #8b8b8b22; border: 2px solid #ffffff10; border-radius: 4px; position: relative; display: flex; align-items: center; justify-content: center; font-size: 9px; line-height: 1.1; text-align: center; padding: 2px; overflow: hidden; cursor: default; color: #e6e8ec; }
.slot.has { border-color: #ffffff22; }
.slot.selected { outline: 2px solid var(--text); }
.slot .cnt { position: absolute; right: 3px; bottom: 1px; font: 600 12px var(--mono); text-shadow: 1px 1px 0 #000; }
.slot.ench { box-shadow: inset 0 0 12px #b36bff88; }
.slot .dur { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 3px; background: #000; }
.slot .dur div { height: 100%; }
.armor { display: flex; flex-direction: column; gap: 4px; }
.effects { display: flex; flex-wrap: wrap; gap: 6px; }
.effect { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; font-size: 12px; }
.tooltip { position: fixed; z-index: 50; background: #100010ee; border: 2px solid #2a0a5c; border-radius: 4px; padding: 6px 9px; font: 12px var(--mono); pointer-events: none; max-width: 280px; }
.tooltip .t-name { color: #fff; }
.tooltip .t-ench { color: #a8a8a8; }
.tooltip .t-id { color: #545454; }

/* Plugin */
.plist { display: flex; flex-direction: column; gap: 6px; }
.pl { display: flex; gap: 12px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.pl.off { opacity: .55; }
.pl .info { flex: 1; min-width: 0; }
.pl .desc { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.res { display: flex; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.res img, .res .noicon { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--panel3); }
.res .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.res .desc { color: var(--muted); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: none; background: none; padding: 5px 12px; color: var(--muted); }
.seg button.active { background: var(--panel3); color: var(--text); }
.banner { background: #3d3318; border: 1px solid #6e5c22; color: var(--yellow); border-radius: 8px; padding: 9px 13px; display: flex; gap: 10px; align-items: center; }

/* Cài đặt */
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px 20px; }
.prop { display: flex; flex-direction: column; gap: 3px; }
.prop label { font-size: 13px; }
.prop .k { font: 11px var(--mono); color: var(--muted); }
.prop.bool { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: none; }
.setting .d { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.form-grid label small { color: var(--muted); }

/* Đăng nhập */
#auth { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, #1d2a1f, var(--bg) 60%); z-index: 40; padding: 16px; }
#auth form { background: var(--panel); border: 1px solid var(--line); padding: 28px; border-radius: 14px; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }
#auth .err { color: var(--red); font-size: 13px; min-height: 18px; }
#auth label.cb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }

/* Giao diện người chơi (quyền player) */
.simple { max-width: 520px; margin: 40px auto; width: 100%; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.simple .big { font-size: 22px; font-weight: 700; }
.simple .ctrl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.simple .ctrl button { justify-content: center; padding: 12px; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 9px; display: none; z-index: 60; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
#toast.err { border-color: var(--red); color: var(--red); }
#toast.ok { border-color: var(--green); color: var(--green); }

@media (max-width: 860px) {
  #t-console.active { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  aside { border-left: none; border-top: 1px solid var(--line); max-height: 38vh; }
  .controls { margin-left: 0; width: 100%; }
  .usermenu { margin-left: auto; }
  .pinfo { grid-template-columns: 1fr; }
  .inv { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .slot { width: auto; aspect-ratio: 1; height: auto; font-size: 7px; }
}

/* ===== v3 ===== */
textarea { font: inherit; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; outline: none; }
textarea:focus { border-color: var(--green); }

/* Ô mật khẩu có nút hiện/ẩn */
.pw { position: relative; display: flex; }
.pw input { flex: 1; padding-right: 40px; width: 100%; }
.pw .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: none; padding: 4px 8px; color: var(--muted); font-size: 15px; }
.pw .eye:hover { color: var(--text); }

/* Địa chỉ server */
.pill.addr { cursor: pointer; border: 1px solid #2c5878; background: #1a3247; color: var(--blue); }
.addr-mini { text-align: center; font-size: 13px; color: var(--muted); }
.addr-mini b { color: var(--blue); font-family: var(--mono); }

/* Hộp thoại */
.dialog-box { max-width: 480px !important; }
.dialog-box h2 { margin-bottom: 6px; }
.dialog-box .fields { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.dialog-box .fields label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.dialog-box .actions { display: flex; justify-content: flex-end; gap: 8px; }
#dialog { z-index: 45; align-items: center; }
.ann-preview { background: #0b0d10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='%2315181d'/%3E%3Crect width='4' height='4' fill='%23191d23'/%3E%3Crect x='4' y='4' width='4' height='4' fill='%23191d23'/%3E%3C/svg%3E"); border: 1px solid var(--line); border-radius: 8px; min-height: 90px; padding: 12px; position: relative; font-family: var(--mono); text-shadow: 2px 2px 0 #000a; }
.ann-preview .t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ann-preview .t b { font-size: 26px; } .ann-preview .ab { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; }
.colors { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.colors button { width: 24px; height: 24px; padding: 0; border-radius: 5px; border: 2px solid #0006; }
.colors button.sel { outline: 2px solid var(--text); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }

/* Danh sách server kiểu Minecraft */
.mclist { display: flex; gap: 10px; background: #0d0d0d; border: 2px solid #000; padding: 6px; font-family: var(--mono); image-rendering: pixelated; }
.mclist img { width: 64px; height: 64px; image-rendering: pixelated; background: #222; }
.mcname { color: #fff; font-size: 15px; }
.mcmotd { color: #aaa; font-size: 14px; white-space: pre-wrap; line-height: 1.35; margin-top: 2px; min-height: 38px; }
.mcplayers { color: #aaa; font-size: 14px; display: inline-flex; gap: 6px; align-items: flex-end; }
.bars { display: inline-flex; gap: 1px; align-items: flex-end; height: 14px; }
.bars i { width: 3px; background: #3c3; display: block; }
.bars i:nth-child(1){height:20%}.bars i:nth-child(2){height:40%}.bars i:nth-child(3){height:60%}.bars i:nth-child(4){height:80%}.bars i:nth-child(5){height:100%}
.mc-o { font-style: italic; } .mc-l { font-weight: bold; } .mc-n { text-decoration: underline; } .mc-m { text-decoration: line-through; }

/* Tab trong cửa sổ người chơi */
.mtabs { display: flex; gap: 4px; margin: 14px 0; border-bottom: 1px solid var(--line); }
.mtabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); padding: 8px 14px; }
.mtabs button.active { color: var(--text); border-bottom-color: var(--green); }
.live { font-size: 11px; color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.2s infinite; }
.live.off { color: var(--muted); } .live.off::before { background: var(--muted); animation: none; }

/* Icon vật phẩm */
.slot .ico { position: absolute; inset: 7px; }
.slot .ico .ly { position: absolute; inset: 0; background-size: 100% auto; background-position: top; background-repeat: no-repeat; image-rendering: pixelated; }
.slot .ico .ly.tint { background-blend-mode: multiply; -webkit-mask-size: 100% auto; mask-size: 100% auto; -webkit-mask-position: top; mask-position: top; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.slot.iconed .lbl { display: none; }
.slot .cube { --s: 24px; position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); transform-style: preserve-3d; transform: rotateX(-30deg) rotateY(-45deg); }
.slot .cube .f { position: absolute; inset: 0; transform-style: preserve-3d; }
.slot .cube .f .ly { position: absolute; inset: 0; background-size: 100% auto; background-position: top; image-rendering: pixelated; }
.slot .cube .top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.slot .cube .left { transform: translateZ(calc(var(--s) / 2)); filter: brightness(.8); }
.slot .cube .right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.62); }
.slot.ench .ico::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, #c38bff66 45%, transparent 60%); background-size: 250% 100%; animation: glint 2.5s linear infinite; -webkit-mask: var(--mask) top / 100% auto no-repeat; mask: var(--mask) top / 100% auto no-repeat; }
@keyframes glint { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.slot .cnt { z-index: 2; } .slot .dur { z-index: 2; }

/* Trang bảo trì */
#maint { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #1d2a1f, #0e1013 65%); }
.maint-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; }
.maint-block { animation: hop 1.4s ease-in-out infinite; }
.block.big { width: 72px; height: 72px; border-radius: 8px; box-shadow: inset 0 0 0 4px rgba(0,0,0,.25), 0 18px 30px -12px #000; }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(-6deg); } }
.maint-title { font-size: 28px; font-weight: 700; letter-spacing: .02em; }
.dots i { font-style: normal; animation: dot 1.4s infinite; opacity: 0; } .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 30%, 70% { opacity: 1; } }

/* App */
.app-hero { display: flex; gap: 14px; align-items: center; }
.app-hero img { width: 64px; height: 64px; border-radius: 14px; }
.steps { color: var(--muted); font-size: 13px; padding-left: 18px; margin: 6px 0; }

@media (max-width: 860px) {
  .pill.addr { order: 5; width: 100%; justify-content: center; }
  .slot .cube { --s: 4.2vw; }
}
.banner.ok { background: #1d3a22; border-color: #2f6b38; color: var(--green); }

/* ===== Thanh trên cùng: luôn 1 hàng, nút không bị đẩy xuống ===== */
@media (min-width: 861px) {
  header { flex-wrap: nowrap; min-height: 58px; }
  header .logo { flex-shrink: 0; white-space: nowrap; }
  header > .pill, header > button.pill { flex-shrink: 1; min-width: 0; white-space: nowrap; }
  #statePill { flex-shrink: 0; }
  .pill.addr { overflow: hidden; max-width: 340px; }
  .pill.addr #addrVal { overflow: hidden; text-overflow: ellipsis; }
  .controls { flex-shrink: 0; flex-wrap: nowrap; }
  .usermenu { flex-shrink: 0; white-space: nowrap; }
}
@media (min-width: 861px) and (max-width: 1500px) { #restartPill { display: none !important; } }
@media (min-width: 861px) and (max-width: 1320px) { #tpsPill { display: none !important; } .controls > button.sm[title^="Chuyển"] { display: none; } }
@media (min-width: 861px) and (max-width: 1180px) { .pill.addr { max-width: 200px; } .controls button:not(.sm) { padding: 7px 10px; } }

/* ===== File ===== */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.crumb { border: none; background: none; padding: 4px 6px; border-radius: 6px; color: var(--text); }
.crumb:hover { background: var(--panel2); }
.crumbs .crumb:last-child { color: var(--green); font-weight: 600; }
.ftable-wrap { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: calc(100vh - 290px); }
.ftable th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.ftable td { padding: 6px 10px; }
.frow:hover { background: var(--panel2); }
.frow.sel { background: #1d3a2244; }
.fname { border: none; background: none; padding: 4px 0; color: var(--text); text-align: left; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.fname:hover { color: var(--green); }
.factions { justify-content: flex-end; gap: 4px; flex-wrap: nowrap; opacity: .55; }
.frow:hover .factions { opacity: 1; }
.drop-hint { display: none; position: absolute; inset: 0; background: #1d3a22dd; color: var(--green); font-size: 18px; font-weight: 600; align-items: center; justify-content: center; border: 2px dashed var(--green); border-radius: 10px; pointer-events: none; }
.ftable-wrap.drag .drop-hint { display: flex; }
.modal > .box.wide { max-width: 1100px; }
#editor { width: 100%; height: 65vh; font: 13px/1.5 var(--mono); background: #0b0d10; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 12px; resize: vertical; tab-size: 2; white-space: pre; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Tài khoản ===== */
.ugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.ucard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.uhead { display: flex; align-items: center; gap: 12px; }
.uav { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.uname { font-size: 16px; font-weight: 700; }
.seg.role button { font-size: 12px; padding: 5px 10px; }
.seg.role button:disabled { opacity: 1; cursor: default; }
.seg.role button.active { background: var(--green-d, #1d3a22); color: var(--green); }
.devs { display: flex; flex-direction: column; gap: 6px; }
.dev { display: flex; align-items: center; gap: 10px; background: var(--panel2); border-radius: 10px; padding: 9px 12px; }
.dev-ic { font-size: 20px; }
.dev-name { font-weight: 600; font-size: 13px; }
.uact { border-top: 1px dashed var(--line); padding-top: 10px; }
.loglist { display: flex; flex-direction: column; max-height: 460px; overflow-y: auto; }
.lg { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.lg:last-child { border-bottom: none; }
.lg-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #1d3a22; color: var(--green); font-weight: 700; flex-shrink: 0; }
.lg.fail .lg-ic { background: #431f1f; color: var(--red); }
@media (max-width: 860px) { .ugrid { grid-template-columns: 1fr; } }

/* Thanh báo cập nhật panel */
.update-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #1a3247; color: var(--blue); border-bottom: 1px solid #2c5878; font-size: 13px; }
/* Tài khoản dạng danh sách */
.urow { border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: none; }
.urow-main { display: grid; grid-template-columns: 42px minmax(140px, 1fr) auto minmax(260px, 1.6fr) auto; gap: 14px; align-items: center; padding: 12px 16px; }
.urow:hover .urow-main { background: #ffffff05; }
.urow .uav { width: 40px; height: 40px; border-radius: 10px; font-size: 17px; }
.ucol-dev { display: flex; align-items: center; gap: 8px; text-align: left; min-width: 0; background: var(--panel2); border-color: transparent; font-size: 13px; }
.ucol-act { flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
.udevs { padding: 0 16px 14px 72px; display: flex; flex-direction: column; gap: 6px; }
.urow.open { background: #ffffff04; }
@media (max-width: 1000px) { .urow-main { grid-template-columns: 42px 1fr auto; } .ucol-dev { grid-column: 1 / -1; } .ucol-act { grid-column: 1 / -1; justify-content: flex-start; } .udevs { padding-left: 16px; } }
