:root {
  --bg: #151924;
  --side: #1b2130;
  --top: #1b2130;
  --card: #1c2230;
  --card-2: #222838;
  --line: rgba(255,255,255,.07);
  --text: #e7edf8;
  --muted: #8d97ab;
  --blue: #3b6cff;
  --green: #1aae72;
  --cyan: #1fb6c9;
  --orange: #f0a020;
  --red: #f04438;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
.shell { min-height: 100%; }
.side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 248px;
  background: var(--side); border-right: 1px solid var(--line);
  overflow: auto; padding: 18px 14px 28px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-size: 18px; font-weight: 700; letter-spacing: .2px; color: #fff; min-width: 0; }
.brand-logo { height: 28px; width: auto; max-width: 118px; object-fit: contain; object-position: left center; background: #fff; border-radius: 6px; padding: 2px 4px; flex: none; }
.mark { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mark i { display: block; border-radius: 2px; }
.mark i:nth-child(1) { background: #3b6cff; }
.mark i:nth-child(2) { background: #1fb6c9; }
.mark i:nth-child(3) { background: #f0a020; }
.mark i:nth-child(4) { background: #1aae72; }
.label { margin: 16px 10px 8px; color: #6e7890; font-size: 11px; letter-spacing: 1.4px; font-weight: 700; }
.item {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px; margin: 2px 0; border-radius: 8px;
  color: #c5cedd; font-weight: 600;
}
.item svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.item:hover { background: rgba(255,255,255,.04); color: #fff; }
.item.on { background: rgba(59,108,255,.18); color: #8eb0ff; }
.item .badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #f04438; color: #fff; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pending-order-badge {
  display: none; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px;
  border-radius: 999px; background: #dc3545; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, .16); flex-shrink: 0;
}
.pending-order-badge.is-visible { display: inline-flex; }
.main { margin-left: 248px; min-height: 100%; }
.top {
  height: 64px; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 22px; gap: 8px; background: var(--top); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.burger {
  margin-right: auto; width: 36px; height: 36px; border: 0; background: transparent; color: #c5cedd; cursor: pointer;
}
.drop { position: relative; }
.drop-btn {
  height: 36px; border: 0; background: transparent; color: #d5deee; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 8px;
}
.drop-btn:hover, .drop.open .drop-btn { background: rgba(255,255,255,.05); }
.bell { position: relative; }
.bell .dot {
  position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #f04438; color: #fff; font-size: 10px; line-height: 16px;
}
.menu {
  display: none; position: absolute; right: 0; top: 42px; min-width: 180px;
  background: #222838; border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.drop.open .menu { display: block; }
.menu a, .menu span { display: block; padding: 8px 10px; border-radius: 7px; color: #d5deee; }
.menu a:hover, .menu a.on { background: rgba(59,108,255,.16); }
.who { text-align: left; line-height: 1.15; }
.who b { display: block; font-size: 13px; }
.who small { color: var(--muted); font-size: 11px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #2a3348;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.page { padding: 22px 24px 40px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head em { color: var(--muted); font-style: normal; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat, .pend {
  display: block; border-radius: 12px; padding: 18px 18px 16px; position: relative; min-height: 118px;
}
.stat { color: #fff; }
.stat.blue { background: #3b6cff; }
.stat.green { background: #1aae72; }
.stat.cyan { background: #1fb6c9; }
.stat.orange { background: #f0a020; }
.stat b, .pend b { display: block; font-weight: 600; opacity: .92; }
.stat strong, .pend strong { display: block; margin-top: 8px; font-size: 28px; letter-spacing: .3px; }
.stat strong { padding-right: 44px; font-size: 20px; letter-spacing: 0; line-height: 1.2; overflow-wrap: anywhere; }
.stat em, .pend em { display: block; margin-top: 8px; font-style: normal; font-size: 12px; opacity: .85; }
.stat i { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; }
.stat svg { width: 20px; height: 20px; }
.pends { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.pend { background: var(--card); border: 1px solid var(--line); }
.pend em { color: #8eb0ff; }
.panels { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-top: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 8px; min-width: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input, .form select, .form input, .panel > input, .qr input[type="text"], .qr input:not([type="checkbox"]):not([type="file"]) {
  height: 36px; border-radius: 8px; border: 1px solid #31425f; background: #121a2b; padding: 0 10px; outline: none;
}
.filters input { min-width: 180px; }
.reset { color: #8eb0ff; padding: 0 8px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.links a, .links button, .linkish {
  height: 30px; border: 1px solid #31425f; border-radius: 7px; background: transparent; color: #d5deee;
  padding: 0 10px; cursor: pointer; display: inline-flex; align-items: center;
}
.links button.ok { color: #3dcc8e; border-color: rgba(26,174,114,.45); }
.links button.danger { color: #ff8b84; border-color: rgba(240,68,56,.45); }
.linkish.add, .linkish.save, .form button, .filters button {
  height: 36px; border: 0; border-radius: 8px; background: #3b6cff; color: #fff; padding: 0 14px; cursor: pointer;
}
.form select, .links select, td select {
  height: 30px; border-radius: 7px; border: 1px solid #31425f; background: #121a2b; padding: 0 6px;
}
td form { margin: 0; }
td select.mini { height: 28px; border: 0; background: transparent; font-weight: 700; padding: 0 16px 0 0; cursor: pointer; }
td select.mini.ok { color: #3dcc8e; }
td select.mini.wait { color: #f0a020; }
td select.mini.bad { color: #f04438; }
td select.mini.muted, td .bank-none { color: #8b95a8; }
td .bank-ok { color: #3dcc8e; font-weight: 700; }
.cust-alerts { margin: 0 0 14px; }
.cust-alerts h3 { margin: 0 0 8px; font-size: 14px; }
.cust-alert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.cust-alert {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  min-width: 0; padding: 8px 10px;
  background: rgba(240, 160, 32, .08);
  border: 1px solid rgba(240, 160, 32, .35);
  border-radius: 8px;
}
.cust-alert b { font-size: 13px; }
.cust-alert .phone { color: #8b95a8; font-size: 12px; }
.cust-alert .open-btn { margin-left: auto; height: 28px; padding: 0 10px; }
.row-flags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.row-flags .tag { height: 18px; padding: 0 6px; font-size: 11px; }
tr.needs-attn td { background: rgba(240, 160, 32, .06); }
.user-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.user-tools h3 { margin: 0; }
.user-tools form { display: flex; gap: 8px; }
.user-tools input { width: 220px; height: 36px; border-radius: 8px; border: 1px solid #31425f; background: #121a2b; color: var(--text); padding: 0 10px; }
.user-tools button { height: 36px; border: 0; border-radius: 8px; background: #2f6bff; color: #fff; padding: 0 16px; cursor: pointer; }
.who-cell { display: flex; align-items: center; gap: 8px; }
.btn-add { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px; background: #2f6bff; color: #fff; font-weight: 700; }
.btn-add.ghost { background: transparent; border: 1px solid #3b6cff; }
.more-wrap { position: relative; }
.more { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #c5cedd; cursor: pointer; font-size: 18px; }
.more-menu { position: fixed; z-index: 45; min-width: 196px; margin: 0; padding: 6px 0; list-style: none; background: #1b2333; border: 1px solid #2c3548; border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.more-menu a, .more-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: transparent; color: #e7edf8; padding: 8px 14px; font-size: 14px; text-align: left; cursor: pointer; }
.more-menu a:hover, .more-menu button:hover { background: rgba(255,255,255,.05); }
.more-menu .danger { color: #f04438; }
.more-menu .muted { color: #8b95a8; font-size: 12px; }
.oknote { background: #d1e7dd; color: #0f5132; border-radius: 6px; padding: 12px 14px; margin-top: 12px; }
.sheet .foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 18px 18px; }
.sheet .foot .ghost,
.sheet .foot .go { height: 36px; margin-top: 0; }
.sheet .ghost, .sheet .go { height: 36px; padding: 0 16px; border: 0; border-radius: 6px; cursor: pointer; }
.sheet .ghost { background: #4b5568; color: #fff; }
.sheet .field { width: 100%; height: 38px; border-radius: 6px; border: 1px solid #3a455c; background: #262d3c; color: #eef2f8; padding: 0 10px; }
#topupMoney { letter-spacing: .85em; font-variant-numeric: tabular-nums; }
.amt-scale { position: relative; height: 18px; margin-top: 6px; }
.amt-scale i { position: absolute; top: 0; transform: translateX(-50%); font-style: normal; font-weight: 400; font-size: 12px; line-height: 18px; color: #9aa6bb; white-space: nowrap; }
.amt-scale i.unit { color: #f0a020; }
.user-create { display: grid; grid-template-columns: 1.7fr .9fr; gap: 16px; align-items: start; }
.user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.user-grid label, .user-grid .span2 { display: flex; flex-direction: column; gap: 6px; color: #c5cedd; font-size: 13px; }
.user-grid em { color: #f04438; font-style: normal; }
.user-grid .span2 { grid-column: 1 / -1; }
.user-grid input, .user-grid select, .user-grid textarea { border-radius: 8px; border: 1px solid #31425f; background: #121a2b; color: var(--text); padding: 8px 10px; }
.user-grid input, .user-grid select { height: 38px; padding: 0 10px; }
.user-grid textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.news-sec { border: 1px solid #31425f; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.news-sec .rm { align-self: flex-start; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #31425f; background: transparent; color: #c5cedd; cursor: pointer; }
.news-actions { grid-template-columns: 1fr 1fr 1fr; }
.user-grid small { color: #8b95a8; }
.create-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.create-actions button, .create-actions a { height: 42px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; }
.create-actions button { background: #2f6bff; color: #fff; }
.create-actions a { background: #d9dde8; color: #3a4254; }
.guide { background: #d7f4f8; color: #0c3d44; border-radius: 10px; padding: 16px 18px; }
.guide.warm { background: #fde7cf; color: #6a3d08; margin-top: 14px; }
.guide h3 { margin: 0 0 8px; font-size: 16px; }
.guide ul { margin: 0; padding-left: 18px; }
.guide li { margin: 4px 0; }
@media (max-width: 960px) { .user-create, .user-grid, .create-actions { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 8px 0 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.form.stack { flex-direction: column; align-items: flex-start; }
.form.stack input, .form.stack select { width: min(360px, 100%); }
.flash { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: rgba(26,174,114,.16); color: #3dcc8e; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); }
.qr input, .panel > form input[type="file"], .qr input[type="file"] { display: block; margin-top: 8px; color: var(--muted); }
.save { margin-top: 14px; }
.note.tight { margin: 2px 0 0; font-size: 12px; }
.seg { display: flex; gap: 8px; }
.seg a { height: 32px; padding: 0 14px; border-radius: 8px; background: #243049; color: #d5deee; display: inline-flex; align-items: center; font-weight: 700; }
.seg a.on { background: #3b6cff; color: #fff; }
.who-name { color: #e7edf8; }
.who .tag { margin-left: 8px; }
.copy-name {
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9aa6bb;
    line-height: 0;
    cursor: pointer;
    vertical-align: -2px;
}
.copy-name.on { color: #7ddea0; }
.note-btn { margin-left: 8px; height: 22px; padding: 0 8px; border-radius: 4px; border: 1px solid #8d97ab; background: transparent; color: #d5deee; font-size: 12px; cursor: pointer; vertical-align: 1px; }
.user-note { display: block; margin-top: 4px; max-width: 240px; color: #f5c16c; font-size: 12px; line-height: 1.35; white-space: normal; word-break: break-word; }
.room-note { margin: -4px 0 12px; max-width: none; }
.note-sheet { width: min(420px, 100%); }
.note-sheet textarea { width: 100%; box-sizing: border-box; min-height: 96px; border-radius: 6px; border: 1px solid #333a48; background: #293042; color: #e7edf8; padding: 8px 10px; resize: vertical; }
.note-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.note-actions .ghost, .note-actions .go { height: 34px; padding: 0 14px; border-radius: 6px; border: 0; cursor: pointer; font-weight: 700; }
.note-actions .ghost { background: transparent; color: #d5deee; border: 1px solid #8d97ab; }
.note-actions .go { background: #2f6bf9; color: #fff; }
.note-err { margin: 8px 0 0; color: #ff6b7a; font-size: 12px; }
.who { white-space: nowrap; }
.name-unread { margin-left: 8px; }
.unread-dot {
  display: none; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #f04438; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  vertical-align: middle;
}
.unread-dot.is-visible { display: inline-flex; }
.note.tight .unread-dot { margin-left: 6px; }
.open-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: #3b6cff; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.room-who { margin: 0 0 8px; color: #8ea0b8; font-size: 13px; }
.room-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.room-bar a { color: #8eb0ff; }
.room-bar button { height: 32px; border-radius: 8px; border: 1px solid #31425f; background: transparent; color: #d5deee; padding: 0 12px; cursor: pointer; }
.room .thread { display: flex; flex-direction: column; gap: 10px; height: 58vh; min-height: 280px; max-height: 580px; overflow: auto; overflow-anchor: none; padding: 16px; background: #111827; border-radius: 8px; }
.thread-older { align-self: center; border: 1px solid #4a5b78; background: #1c283c; color: #d5deee; border-radius: 14px; height: 28px; padding: 0 12px; font-size: 12px; cursor: pointer; }
.thread-older:disabled { opacity: .65; cursor: default; }
.bubble { max-width: 72%; background: #263244; color: #fff; border-radius: 12px; padding: 10px 13px; }
.bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bubble small { display: block; margin-top: 6px; color: #8795ad; font-size: 12px; }
.msg-read { margin-left: 8px; font-style: normal; color: #9aa6bb; }
.msg-read.on { color: #7ddea0; }
.bubble .recall { margin-left: 8px; border: 0; background: transparent; color: #f0b429; font-size: 12px; cursor: pointer; padding: 0; }
.bubble.recalled { opacity: .55; }
.msg-gone { margin-left: 8px; font-style: normal; color: #f0b429; }
.bubble.mine { margin-left: auto; background: rgba(47,107,249,.28); }
.bubble img, .bubble video { display: block; max-width: 280px; max-height: 240px; border-radius: 8px; }
.bubble img { cursor: zoom-in; background: #fff; padding: 4px; }
.room input[type="file"] { display: none !important; }
.reply { margin-top: 12px; }
.reply-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 10px; align-items: stretch; }
.reply-row .plus, .reply-row textarea, .reply-row .send { grid-row: 1; }
.reply-row .send-hint { grid-column: 3; grid-row: 2; font-size: 11px; line-height: 1.3; color: #8d97ab; text-align: center; white-space: nowrap; }
.reply-row .plus { min-width: 48px; border: 1px solid #b6c2e4; border-radius: 4px; background: transparent; color: #b6c2e4; font-size: 22px; line-height: 1; cursor: pointer; }
.reply-row .plus:disabled { opacity: .45; }
.reply-row textarea { min-height: 53px; height: 53px; border-radius: 4px; border: 1px solid #333a48; background: #293042; color: #d4d6d9; padding: 6px 16px; resize: vertical; }
.reply-row .send { border: 0; border-radius: 4px; background: #2f6bf9; color: #fff; padding: 0 24px; cursor: pointer; font-size: 13px; }
.reply-row .send:disabled { opacity: .55; }
.reply-error, .quick-error { display: none; margin-top: 7px; color: #ff6b7a; font-size: 12px; }
.reply-preview { display: none; margin-bottom: 8px; }
.reply-preview.show { display: flex; align-items: center; gap: 10px; position: relative; padding: 9px 40px 9px 9px; border: 1px solid #dee2e6; border-radius: 10px; background: #f8f9fa; color: #212529; min-height: 72px; }
.reply-preview .thumb { width: 58px; height: 58px; border-radius: 8px; object-fit: contain; background: #fff; }
.reply-preview .clip { width: 78px; height: 58px; border-radius: 8px; background: #000; }
.reply-preview .meta { min-width: 0; flex: 1; }
.reply-preview .meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-preview .meta span { display: block; margin-top: 4px; font-size: 11px; color: #6c757d; font-weight: 400; }
.reply-preview .rm { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #e9ecef; color: #343a40; font-size: 18px; line-height: 24px; padding: 0; cursor: pointer; }
.quick-bar { margin-top: 12px; padding: 12px; border-radius: 8px; background: #172033; }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quick-title { font-weight: 700; }
.quick-manage { height: 30px; padding: 0 10px; border-radius: 4px; border: 1px solid #8d97ab; background: transparent; color: #e7edf8; cursor: pointer; font-size: 12px; }
.quick-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-send { border: 1px solid #4a5b78; background: #26344d; color: #eaf1ff; border-radius: 18px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.quick-send:hover { background: #2f75e8; border-color: #2f75e8; color: #fff; }
.quick-empty { color: #8795ad; font-size: 12px; }
.quick-note { margin-top: 8px; color: #8795ad; font-size: 12px; }
.quick-manager { display: none; margin-top: 10px; padding: 12px; border: 1px solid #34425a; border-radius: 8px; background: #111827; }
.quick-manager.show { display: block; }
.quick-add, .quick-row { display: grid; gap: 8px; align-items: start; }
.quick-add { grid-template-columns: 160px minmax(0, 1fr) 90px auto; margin: 12px 0; }
.quick-row { grid-template-columns: 150px minmax(0, 1fr) 80px 72px auto; align-items: center; padding: 8px; border: 1px solid #2c3950; border-radius: 8px; }
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-add input, .quick-add textarea, .quick-row input, .quick-row textarea { width: 100%; border-radius: 4px; border: 1px solid #34425a; background: #182235; color: #fff; padding: 6px 8px; }
.quick-add textarea, .quick-row textarea { resize: vertical; min-height: 38px; }
.quick-add .add { height: 32px; border: 0; border-radius: 4px; background: #2f6bf9; color: #fff; padding: 0 12px; cursor: pointer; }
.qr-on { display: flex; align-items: center; gap: 4px; color: #d5deee; font-size: 13px; white-space: nowrap; }
.qr-actions { display: flex; gap: 5px; }
.qr-save, .qr-delete { height: 30px; padding: 0 10px; border-radius: 4px; background: transparent; cursor: pointer; font-size: 12px; }
.qr-save { border: 1px solid #2f6bf9; color: #8eb0ff; }
.qr-delete { border: 1px solid #f04438; color: #ff8d86; }
.chat-lightbox { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.82); }
.chat-lightbox img { max-width: 90vw; max-height: 90vh; background: #fff; padding: 8px; border-radius: 8px; }
.chat-lightbox button { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 22px; cursor: pointer; }
@media (max-width: 900px) {
  .quick-add { grid-template-columns: 1fr 1fr; }
  .quick-add textarea, .quick-row textarea, .qr-actions { grid-column: 1 / -1; }
  .quick-row { grid-template-columns: 1fr 80px; }
}
@media (max-width: 1100px) {
  .stats, .pends, .panels, .qrs, .split { grid-template-columns: 1fr 1fr; }
}
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-h h3 { margin: 0; font-size: 15px; }
.search { display: flex; gap: 8px; }
.search input, .form input {
  height: 36px; border-radius: 8px; border: 1px solid #31425f; background: #121a2b; padding: 0 10px; outline: none;
}
.search button, .form button, .linkish {
  height: 36px; border: 0; border-radius: 8px; background: #3b6cff; color: #fff; padding: 0 14px; cursor: pointer;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.tag.green { background: rgba(26,174,114,.16); color: #3dcc8e; }
.tag.red { background: rgba(240,68,56,.16); color: #ff8b84; }
.tag.orange { background: rgba(240,160,32,.16); color: #f0a020; }
.tag.blue { background: rgba(59,108,255,.16); color: #8eb0ff; }
.tag.muted { background: rgba(255,255,255,.06); color: #9aa6bb; }
.when { display: block; color: var(--muted); font-size: 12px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 4px 8px; color: var(--muted); }
.pager a { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #222838; }
.pager a.on { background: #3b6cff; color: #fff; }
.form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.note { color: var(--muted); margin: 0 0 14px; }
.qrs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qr img { max-width: 180px; max-height: 180px; background: #fff; border-radius: 8px; margin-top: 10px; }
.inbox { display: grid; gap: 10px; }
.msg { background: var(--card-2); border-radius: 10px; padding: 12px 14px; }
.msg b { margin-right: 8px; }
.msg small { color: var(--muted); }
.msg p { margin: 6px 0 0; color: #c5cedd; white-space: pre-wrap; }
body.side-hide .side { transform: translateX(-100%); }
body.side-hide .main { margin-left: 0; }
@media (max-width: 1100px) {
  .stats, .pends, .panels, .qrs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .side { transform: translateX(-100%); }
  .main { margin-left: 0; }
  body.side-open .side { transform: none; }
  .stats, .pends, .panels, .qrs, .coins, .trade-filter { grid-template-columns: 1fr; }
}
.note-menu { width: 320px; padding: 0; }
.note-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 700; border-bottom: 1px solid var(--line); }
.note-menu a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.note-menu a b { display: block; }
.note-menu a small { float: right; color: var(--muted); font-weight: 500; }
.note-menu a span, .note-empty { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.note-empty { padding: 14px; }
.note-all { text-align: center; color: #8eb0ff !important; }
.trade-filter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trade-filter label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.trade-filter input, .trade-filter select { height: 38px; border-radius: 8px; border: 1px solid #31425f; background: #121a2b; padding: 0 10px; color: var(--text); }
.trade-filter .wide { grid-column: 1 / 3; }
.stake-filter { grid-template-columns: repeat(5, 1fr); }
.stake-filter .trade-actions { grid-column: 1 / -1; }
.cash-filter { grid-template-columns: repeat(4, 1fr); }
.cash-filter .trade-actions { grid-column: 1 / -1; justify-content: flex-start; }
.cash-filter .trade-actions button, .cash-filter .trade-actions a { flex: 0 0 auto; min-width: 108px; }
.open-btn svg { margin-right: 4px; }
.open-btn.info { background: #17a2b8; }
.open-btn.danger { background: #f04438; }
.open-btn:disabled { opacity: .55; cursor: default; }
.panel + .stats { margin-top: 16px; }
.trade-actions { grid-column: 3 / 5; display: flex; gap: 10px; align-items: end; }
.trade-actions button { flex: 1; height: 40px; border: 0; border-radius: 8px; background: #3b6cff; color: #fff; }
.trade-actions a { flex: 1; height: 40px; border: 1px solid #8b95a8; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.trade-stats { margin: 16px 0; }
.up { color: #3dcc8e; }
.down { color: #ff8b84; }
.warn { color: #f0a020; }
.coins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.coins article { background: #171d2b; border-radius: 10px; padding: 14px 14px 12px; }
.coin-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.coin-hd img, .coin-hd i { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: contain; }
.coin-hd img { background: #fff; padding: 2px; }
.coin-hd i { background: #243049; color: #7aa2ff; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 14px; }
.coin-hd b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.coin-hd small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.coin-sides { display: flex; justify-content: space-between; }
.coin-sides span { display: flex; flex-direction: column; gap: 2px; }
.coin-sides .down { align-items: flex-end; text-align: right; }
.coin-sides em { font-style: normal; font-size: 12px; }
.coin-sides strong { font-size: 16px; font-weight: 700; }
.ava { width: 22px; height: 22px; border-radius: 50%; background: #2a3348; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; margin-right: 6px; }
.open-btn.ghost { margin: 8px 0 8px auto; background: transparent; border: 1px solid #3b6cff; color: #8eb0ff; }
.modal { width: min(760px, 100%); margin: 0 auto; background: #1c2436; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.modal header { background: #3b6cff; color: #fff; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.modal header a { color: #fff; font-size: 22px; line-height: 1; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; padding: 18px; }
.modal-grid span { display: block; color: var(--muted); font-size: 12px; }
.mask { position: fixed; top: 0; right: 0; bottom: 0; left: 248px; z-index: 40; background: rgba(8, 12, 20, .55); display: flex; align-items: flex-start; justify-content: center; padding: 56px 16px; overflow: visible; }
@media (max-width: 760px) { .mask { left: 0; } }
.mask[hidden] { display: none; }
.sheet { width: min(720px, 100%); background: #323846; color: #eef2f8; border-radius: 6px; box-shadow: 0 18px 48px rgba(0,0,0,.45); }
.sheet header { background: #2f6bff; color: #fff; border-radius: 6px 6px 0 0; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 600; }
.sheet header button, .sheet header a { border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; text-decoration: none; }
.sheet .body { padding: 18px 22px 22px; }
.sheet .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 36px; }
.sheet p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.sheet h6 { margin: 8px 0 10px; font-size: 15px; font-weight: 700; }
.sheet select.light, .status-face { width: 100%; height: 38px; border-radius: 6px; border: 1px solid #ced4da; background: #fff; color: #212529; padding: 0 10px; font-size: 14px; }
.sheet select.light:disabled, .status-face:disabled { background: #e9ecef; color: #6c757d; }
.status-pick { position: relative; }
.status-face { display: block; text-align: left; padding-right: 32px; cursor: pointer; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%236c757d' d='M2.2 4.2 6 8l3.8-3.8-.9-.9L6 6.2 3.1 3.3z'/></svg>") no-repeat right 12px center; }
.status-face:disabled { cursor: default; }
.status-menu { position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px 0; list-style: none; background: #ececf1; border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.28); }
.status-menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; color: #1c1c1e; padding: 8px 14px; font-size: 15px; line-height: 1.3; cursor: pointer; text-align: left; }
.status-menu button::before { content: ''; width: 16px; flex: 0 0 16px; font-weight: 700; }
.status-menu button.on { background: #0a84ff; color: #fff; }
.status-menu button.on::before { content: '✓'; }
.status-menu button:hover:not(.on) { background: rgba(0,0,0,.06); }
.sheet .go { margin-top: 14px; height: 38px; padding: 0 16px; border: 0; border-radius: 6px; background: #0d6efd; color: #fff; font-size: 14px; cursor: pointer; }
.sheet .go[hidden] { display: none; }
.sheet .tag.green { background: #198754; color: #fff; }
.sheet .tag.red { background: #dc3545; color: #fff; }
.sheet .tag.orange { background: #ffc107; color: #212529; }
@media (max-width: 720px) { .sheet .cols { grid-template-columns: 1fr; } }
.page-head em a { color: #8eb0ff; }
.batch-wl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batch-wl span { color: #9aa6bb; font-size: 13px; }
.batch-wl button {
  height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid #3a4864;
  background: #1b2434; color: #e7edf8; font-size: 13px; cursor: pointer;
}
.batch-wl button:hover { border-color: #3b6cff; color: #8eb0ff; }
.wl { position: relative; display: inline-block; }
.wl-btn {
  appearance: none; -webkit-appearance: none;
  min-width: 92px; height: 32px;
  border-radius: 6px; border: 1px solid #3a4864;
  background: #1b2434 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%239aa6bb' d='M2.2 4.2 6 8l3.8-3.8-.9-.9L6 6.2 3.1 3.3z'/></svg>") no-repeat right 8px center;
  color: #e7edf8; padding: 0 26px 0 10px; font-size: 13px; cursor: pointer; text-align: left;
}
.wl-btn:disabled { opacity: .6; }
.wl-menu {
  position: fixed; z-index: 50; min-width: 132px;
  margin: 0; padding: 6px 0; list-style: none;
  background: #d7d7dd; color: #1c1c1e;
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.wl-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: auto; border: 0; background: transparent;
  color: #1c1c1e; padding: 7px 18px 7px 12px; font-size: 14px; line-height: 1.3;
  cursor: pointer; text-align: left;
}
.wl-menu button::before { content: ''; width: 14px; flex: 0 0 14px; text-align: center; font-weight: 700; }
.wl-menu button.on::before { content: '✓'; }
.wl-menu button:hover { background: rgba(0,0,0,.06); }
.wl-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  background: #1c2436; border: 1px solid rgba(26,174,114,.45); color: #3dcc8e;
  padding: 10px 14px; border-radius: 8px;
}
.wl-toast.bad { color: #ff8b84; border-color: rgba(240,68,56,.45); }
.date-chip, .icon-btn { width: 42px; height: 42px; border-radius: 8px; border: 1px solid #3b6cff; background: transparent; color: #dbe7ff; display: inline-flex; align-items: center; justify-content: center; margin-left: 8px; }
.date-chip { width: auto; min-width: 42px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #3b6cff; color: #8eb0ff; background: transparent; cursor: pointer; }
.btn-line.wide { width: 100%; margin-top: 12px; }
.btn-line.danger { border-color: #f04438; color: #ff8b84; }
.who-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 16px; }
.who-main { display: flex; align-items: center; gap: 12px; }
.who-ava { width: 42px; height: 42px; border-radius: 50%; background: #243049; color: #9eb0d0; display: flex; align-items: center; justify-content: center; }
.who-main b, .who-main small { display: block; }
.who-main small { color: var(--muted); margin-top: 4px; }
.profile-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 16px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 16px; grid-column: 2; grid-row: 1 / span 2; }
.fund-list { display: grid; gap: 0; }
.fund-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fund-list div:last-child { border-bottom: 0; }
.fund-list span { color: var(--muted); font-size: 13px; }
.fund-list b { font-weight: 700; }
.fund-list b.ok { color: #3dcc8e; }
.fund-list b.bad { color: #f04438; }
.fund-list b.blue { color: #5aa2ff; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.info-grid.one { grid-template-columns: 1fr; }
.info-grid .span2 { grid-column: 1 / -1; }
.info-grid span, .kyc-line span, .state-row span, .side-kv span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.info-grid b, .side-kv b, .kyc-line b { font-weight: 600; }
.state-row, .kyc-line, .side-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kyc-shot { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kyc-shot img { display: block; width: 100%; max-height: 220px; margin-top: 8px; object-fit: contain; border-radius: 8px; background: #fff; }
.pill { border-radius: 6px; padding: 2px 8px; font-style: normal; font-size: 12px; font-weight: 700; }
.pill.ok { color: #3dcc8e; }
.pill.bad { color: #f04438; }
.pill.wait { color: #f0a020; }
.risk.low { color: #5aa2ff; font-style: normal; font-weight: 700; }
.risk.mid { color: #f0a020; font-style: normal; font-weight: 700; }
.risk.high { color: #f04438; font-style: normal; font-weight: 700; }
.file-lab { display: block; margin: 10px 0; color: var(--muted); font-size: 13px; }
.file-lab input { display: block; margin-top: 6px; color: var(--text); }
.block-title { margin: 18px 0 8px; }
.sheet.slim { width: min(520px, 100%); }
.sheet.slim .go { margin-top: 0; }
.sheet .k { color: #c5cedd; font-size: 13px; margin: 0 0 4px; }
.pwd-now { margin: 0 0 12px; color: #f5c16c; font-size: 15px; font-weight: 700; word-break: break-all; }
.money-neg { color: #f04438; font-weight: 700; }
.chat-table tr.has-unread td { background: rgba(240, 68, 56, .14); }
.sheet .hint { color: #9aa6bb; font-size: 12px; margin: 6px 0 14px; }
.sheet.slim .foot .ghost { background: transparent; border: 1px solid #8b95a8; color: #e7edf8; }
.coin { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; }
.coin-photo { width: 50px; height: 50px; object-fit: contain; border-radius: 4px; background: #fff; padding: 3px; display: block; }
.no-img { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 8px; background: #1b2434; color: #8b95a8; font-size: 11px; text-align: center; line-height: 1.1; }
.code-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: #2f6bff; color: #fff; font-size: 12px; font-weight: 700; }
.st { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; }
.st.ok { background: #1f9d55; }
.st.bad { background: #e11d48; }
.acts { display: flex; gap: 6px; align-items: center; }
.acts form { margin: 0; }
.act { width: 32px; height: 32px; border-radius: 8px; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.act.view { border: 1px solid #22d3ee; color: #22d3ee; }
.act.edit { border: 1px solid #f5a524; color: #f5a524; }
.act.off { border: 1px solid #64748b; color: #94a3b8; }
.act.off.on { background: #22d3ee; border-color: #22d3ee; color: #082033; }
.act.del { border: 1px solid #f04438; color: #f04438; }
.contract-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.contract-h b { font-size: 16px; }
.contract-sheet { max-width: 920px; }
.contract-form { max-width: 860px; }
.contract-bar { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin-top: 18px; }
.contract-bar form { margin: 0; }
.bar { height: 40px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; font-weight: 700; cursor: pointer; }
.bar.back { background: #d9dde8; color: #3a4254; }
.bar.edit { background: #f5a524; color: #fff; }
.bar.del { background: #f04438; color: #fff; }
@media (max-width: 960px) {
  .profile-grid, .info-grid { grid-template-columns: 1fr; }
  .profile-side { grid-column: auto; grid-row: auto; }
}
.page:has(.price-card) .page-head { display: none; }
.price-card { max-width: 760px; margin: 72px auto 0; padding: 22px 26px 28px; }
.price-card h3 { margin: 0 0 18px; font-size: 16px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 36px; }
.price-grid label { display: flex; flex-direction: column; gap: 8px; color: #c5cedd; font-size: 14px; }
.price-grid .timer { grid-column: 1; }
.price-grid select, .price-grid input { height: 40px; border-radius: 6px; border: 1px solid #3a4864; background: #121a2b; color: var(--text); padding: 0 10px; }
.price-card button { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 26px auto 0; height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: #2f6bff; color: #fff; font-weight: 700; cursor: pointer; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.cfg { display: flex; flex-direction: column; gap: 16px; }
.cfg .span2 { grid-column: 1 / -1; }
.cfg .panel h3 { margin: 18px 0 12px; font-size: 15px; }
.cfg .panel h3:first-of-type { margin-top: 0; }
.cfg .hint { color: #8b95a8; margin: 8px 0 0; }
.cfg img { background: #fff; }
.cfg .user-grid label img, .cfg .pics img, .cfg td.pic img { display: block; height: 48px; width: auto; max-width: 160px; margin: 4px 0; padding: 4px; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); }
.cfg table input, .cfg table select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; height: 34px; border-radius: 8px; border: 1px solid #31425f; background: #121a2b; color: var(--text); padding: 0 8px; }
.cfg td { vertical-align: middle; }
.slide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.slide-head h3 { margin: 0; }
.slide-table { table-layout: fixed; width: 100%; }
.slide-table th, .slide-table td { overflow: hidden; }
.slide-table col.pic { width: 112px; }
.slide-table col.sort { width: 76px; }
.slide-table col.show { width: 100px; }
.slide-table col.ops { width: 72px; }
.slide-table td.pic img { width: 92px; height: 42px; max-width: 92px; margin: 0; object-fit: contain; }
.slide-table td.ops { overflow: visible; }
.slide-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; color: #c5cedd; font-size: 13px; }
.slide-field input[type="file"] { color: #d5deee; }
.cfg .act { height: 32px; }
