﻿* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #18233a;
  color: #fff;
}
button, input { font-family: inherit; }
button {
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease, opacity .12s ease, background-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
button:hover { filter: brightness(1.03); }
button:active { transform: scale(.96); filter: brightness(.96); }
button:disabled { opacity: .58; cursor: not-allowed; transform: none; filter: grayscale(.15); }
.hidden { display: none !important; }
.security-modal {
  position: absolute;
  inset: 34px 0 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 15, 29, .72);
  backdrop-filter: blur(3px);
}
.security-modal-card {
  width: min(100%, 390px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  color: #1d2738;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.security-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf5;
}
.security-modal-title { font-size: 17px; font-weight: 800; }
.security-modal-hint { margin-top: 4px; color: #718096; font-size: 12px; }
.security-verification-frame {
  width: 100%;
  height: min(520px, 64vh);
  border: 0;
  background: #f5f7fb;
}
.security-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 12px;
  color: #718096;
  font-size: 12px;
}
.security-modal-foot .main-btn { width: auto; min-width: 86px; padding: 9px 12px; }
.feature-modal {
  position: absolute;
  inset: 34px 0 0;
  z-index: 28;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 15, 29, .68);
  backdrop-filter: blur(4px);
}
.feature-modal-card {
  width: min(100%, 380px);
  max-height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  color: #1d2738;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0,0,0,.32);
}
.feature-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px 13px;
  border-bottom: 1px solid #e8edf5;
  background: #f8faff;
}
.feature-modal-heading { min-width: 0; }
.feature-modal-title { color: #10213d; font-size: 18px; font-weight: 900; }
.feature-modal-bot {
  margin-top: 4px;
  overflow: hidden;
  color: #718096;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feature-modal-close {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 0;
  border-radius: 50%;
  color: #64748b;
  background: #e9eef6;
  font-size: 22px;
  line-height: 1;
}
.feature-panel {
  min-height: 0;
  padding: 16px 17px 14px;
  overflow-y: auto;
}
.feature-field { display: grid; gap: 6px; margin-bottom: 12px; }
.feature-field span,
.feature-list-title { color: #526174; font-size: 12px; font-weight: 800; }
.feature-field input {
  width: 100%;
  height: 45px;
  border: 1px solid #dfe6f0;
  border-radius: 11px;
  outline: 0;
  padding: 0 13px;
  color: #10213d;
  background: #f7f9fd;
  font-size: 14px;
}
.feature-field input:focus {
  border-color: #6f9cff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,124,255,.10);
}
.feature-submit,
.feature-admin-actions button {
  width: 100%;
  height: 43px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #2f7bf6;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(47,123,246,.18);
}
.feature-submit.friend { background: #08a94f; box-shadow: 0 8px 18px rgba(8,169,79,.16); }
.feature-submit.nickname {
  background: #ed8b0b;
  box-shadow: 0 8px 18px rgba(237,139,11,.18);
}
.feature-switch-actions { display: grid; gap: 10px; }
.feature-switch-actions button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.feature-switch-actions .switch-login {
  background: #2f7bf6;
  box-shadow: 0 8px 18px rgba(47,123,246,.18);
}
.feature-switch-actions .nickname {
  background: #ed8b0b;
  box-shadow: 0 8px 18px rgba(237,139,11,.18);
}
.feature-switch-actions .restart-bot {
  background: #18a673;
  box-shadow: 0 8px 18px rgba(24,166,115,.18);
}
.feature-switch-actions .reset-device {
  background: #d58a1f;
  box-shadow: 0 8px 18px rgba(213,138,31,.18);
}
.feature-switch-actions .delete-robot {
  background: #ef4456;
  box-shadow: 0 8px 18px rgba(239,68,86,.16);
}
.nickname-modal { z-index: 30; }
.nickname-modal-card { width: min(100%, 360px); }
.nickname-modal-panel { padding-bottom: 16px; }
.nickname-modal-panel .feature-submit { margin-top: 4px; }
.nickname-modal-panel .feature-modal-status { padding: 10px 0 0; }
.feature-admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.feature-admin-actions button { background: #3478ff; }
.feature-admin-actions button.super { background: #7c5ce7; box-shadow: 0 8px 18px rgba(124,92,231,.18); }
.feature-list-title { margin: 16px 0 8px; }
.feature-admin-list {
  max-height: 210px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #e7ebf2;
  border-radius: 11px;
  background: #f8faff;
}
.feature-admin-list .admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid #dbe6ff;
  border-radius: 999px;
  color: #2563eb;
  background: #edf4ff;
  font-size: 11px;
  font-weight: 800;
}
.feature-admin-list .admin-chip.super { color: #7c3aed; border-color: #e8dcff; background: #f3edff; }
.admin-chip.pretty { border-radius: 10px; }
.admin-id-lines {
  display: inline-flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
}
.admin-id-lines span:first-child { font-size: 11px; font-weight: 800; }
.admin-id-lines span:last-child { font-size: 9px; font-weight: 600; opacity: .72; }
.feature-admin-list .admin-role {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: #3478ff;
  font-size: 10px;
}
.feature-admin-list .admin-chip.super .admin-role { background: #7c3aed; }
.feature-admin-list [data-admin-delete] {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #fff;
  background: #ef6680;
  font-size: 13px;
  line-height: 18px;
}
.feature-admin-list .empty-tip { width: 100%; padding: 13px; color: #94a3b8; text-align: center; font-size: 12px; }
.feature-modal-status {
  min-height: 34px;
  padding: 8px 17px 11px;
  color: #718096;
  background: #fff;
  font-size: 12px;
  text-align: center;
}
.feature-modal-status.success { color: #078a47; }
.feature-modal-status.error { color: #d63c57; }
.desktop-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(90,145,255,.35), transparent 28%),
    radial-gradient(circle at 80% 90%, rgba(255,78,126,.22), transparent 32%),
    #101827;
}
.phone-shell {
  width: 430px;
  max-width: 100%;
  height: 880px;
  max-height: calc(100vh - 36px);
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(180deg, #203357 0%, #131c30 100%);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone-status {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.08);
}
.login-view, .app-view { height: calc(100% - 34px); }
.login-view {
  padding: 52px 34px 30px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.05) 25%, transparent 25%) 0 0/40px 40px,
    linear-gradient(225deg, rgba(255,255,255,.04) 25%, transparent 25%) 0 0/40px 40px,
    linear-gradient(180deg, #263b65, #121b2f);
}
.wolf-logo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 30px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  margin-bottom: 28px;
}
.login-hello { font-size: 32px; font-weight: 800; margin-bottom: 6px; }
.login-title { font-size: 20px; color: rgba(255,255,255,.78); margin-bottom: 34px; }
.login-card {
  padding: 24px;
  border-radius: 26px;
  background: rgba(13, 24, 43, .72);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  backdrop-filter: blur(8px);
}
.login-tabs { display: flex; gap: 12px; margin-bottom: 20px; }
.login-tab {
  flex: 1;
  border: 0;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.68);
}
.login-tab.active { background: #fa436a; color: #fff; font-weight: 700; }
.login-form { position: relative; }
.login-input {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.11);
  padding: 0 14px;
  margin-bottom: 14px;
}
.login-input input,
.login-input select {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
}
.login-input select { cursor: pointer; }
.login-input select option { color: #1d2738; background: #fff; }
.login-input input::placeholder { color: rgba(255,255,255,.45); }
.account-history {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  z-index: 20;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 14px;
  background: #15223a;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 16px 38px rgba(0,0,0,.34);
}
.account-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.account-history-item:hover {
  background: rgba(255,255,255,.1);
}
.account-history-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-history-delete {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
  font-size: 18px;
  line-height: 22px;
  padding: 0;
}
.account-history-delete:hover {
  background: #fa436a;
  color: #fff;
}
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.75);
  font-size: 13px;
  margin: -2px 2px 12px;
}
.remember-row input {
  width: 16px;
  height: 16px;
  accent-color: #fa436a;
}
.login-btn, .main-btn {
  width: 100%;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #fa436a, #ff7a45);
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 12px 30px rgba(250,67,106,.25);
}
.login-error { min-height: 22px; color: #ffb6c1; margin-top: 12px; font-size: 13px; }
.app-view { display: flex; flex-direction: column; background: #f4f6fb; color: #1d2738; }
.app-header {
  height: 78px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, #263b65, #1d2d4e);
}
.app-title { font-size: 22px; font-weight: 900; }
.app-subtitle { margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.72); }
.mini-icon {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255,255,255,.14);
}
.app-content {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  padding-bottom: 88px;
}
.tab-page { display: none; }
.tab-page.active { display: block; }
.summary-card, .selected-card, .profile-card {
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff, #eef3ff);
  box-shadow: 0 10px 28px rgba(45,67,108,.09);
}
.summary-card { display: flex; align-items: center; justify-content: space-between; }
.summary-title { font-size: 17px; font-weight: 900; }
.summary-text { font-size: 12px; color: #7c879b; margin-top: 5px; }
.pill-btn {
  border: 0;
  border-radius: 999px;
  color: #3167d8;
  background: #e9f0ff;
  padding: 8px 12px;
  font-weight: 700;
}
.pill-btn.danger { color: #d9435b; background: #ffe8ec; }

.bot-search-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(33,44,70,.08);
}
.bot-search-card input {
  flex: 1;
  border: 0;
  outline: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f1f5fb;
  color: #071733;
  font-weight: 700;
}
.bot-view-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: -4px 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #e9eef6;
}
.bot-view-switch button {
  height: 36px;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}
.bot-view-switch button.active {
  color: #1e5ed8;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30, 51, 86, .12);
}
.bot-card { cursor: grab; user-select: none; }
.bot-card.dragging {
  opacity: .72;
  transform: scale(.985);
  border-color: #3b7cff;
}
.bot-seq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-right: 5px;
  border-radius: 999px;
  color: #fff;
  background: #3b7cff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(59,124,255,.22);
}
.bot-title-line { display: flex; align-items: center; min-width: 0; }
.bot-title-line .bot-name-text { min-width: 0; overflow: hidden; color: #0f172a; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 18px; text-align: center; color: #718096; }

.bot-list { display: grid; width: 100%; min-width: 0; gap: 10px; }
.bot-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 11px;
  padding: 7px;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 10px 26px rgba(33,44,70,.08);
}
.bot-card.active { border-color: #fa436a; }
.bot-status-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 21px; margin-bottom: 2px; }
.bot-status-left,
.bot-status-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bot-status-left { flex: 0 1 auto; }
.bot-status-right { flex: 1 1 auto; justify-content: flex-end; overflow: hidden; }
.state-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 150px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: #718096;
  background: #edf2f7;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.state-tag::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
}
.state-tag.online { color: #0fa46a; background: #e4fff3; }
.state-tag.online::before { background: #10b981; }
.state-tag.warning { color: #b45309; background: #fff7ed; }
.state-tag.warning::before { background: #f59e0b; }
.state-tag.notice { color: #64748b; background: #edf2f7; }
.bot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.bot-name { display: flex; align-items: baseline; min-width: 0; gap: 7px; font-size: 14px; font-weight: 900; }
.bot-name small { overflow: hidden; color: #94a3b8; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.badge { padding: 3px 7px; border-radius: 999px; font-size: 10px; color: #718096; background: #edf2f7; }
.badge.online { color: #0fa46a; background: #e4fff3; }
.badge.room { color: #2563eb; background: #e8f0ff; }
.bot-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 5px;
  margin-top: 0;
}
.bot-info-item {
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f8fafc;
}
.bot-info-item span {
  display: inline;
  margin-right: 5px;
  color: #8a96a8;
  font-size: 10px;
}
.bot-info-item b {
  display: inline;
  overflow: hidden;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-info-item:nth-child(2) b { color: #2563eb; }
.bot-remark-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #edf1f6;
}
.bot-remark-display {
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f7f9fc;
}
.bot-remark-display span { margin-right: 4px; }
.bot-remark-display b { display: inline-block; max-width: calc(100% - 28px); vertical-align: middle; }
.bot-remark-edit {
  min-width: 52px;
  height: 27px;
  padding: 3px 7px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #3b7cff;
  font-size: 10px;
  font-weight: 800;
}
.bot-remaining-inline {
  flex: 0 0 86px;
  min-width: 0;
  padding: 3px 5px;
  border-radius: 6px;
  background: #f7f9fc;
}
.bot-remaining-inline span {
  display: block;
  color: #8a96a8;
  font-size: 9px;
}
.bot-remaining-inline b {
  display: block;
  overflow: hidden;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-remark-editor {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.bot-remark-label {
  display: none;
  margin-bottom: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.bot-remark-row { display: flex; align-items: stretch; gap: 5px; }
.bot-remark-input {
  flex: 1;
  min-width: 0;
  resize: none;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  outline: none;
  height: 25px;
  min-height: 25px;
  padding: 4px 7px;
  color: #334155;
  background: #fbfcfe;
  font: inherit;
  font-size: 10px;
  line-height: 1.2;
}
.bot-remark-input:focus { border-color: #7aa7ff; box-shadow: 0 0 0 3px rgba(59,124,255,.11); }
.bot-remark-input::placeholder { color: #a4afbd; }
.bot-remark-save {
  align-self: stretch;
  min-width: 40px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #3b7cff;
  font-size: 10px;
  font-weight: 800;
}
.bot-remark-status { display: block; min-height: 0; margin-top: 1px; color: #16a36c; font-size: 9px; }
.bot-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}
.card-login-btn,
.card-room-btn,
.card-manage-btn,
.card-friend-btn,
.switch-bot-btn {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 4px 3px;
  color: #fff;
  background: #2f7bf6;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}
.card-login-btn { background: #0f9f8f; }
.card-manage-btn { background: #7c5ce7; }
.card-friend-btn { background: #08a94f; }
.switch-bot-btn { background: #e98b16; }

/* Compact list: one stable row per account for high-volume scanning. */
.bot-list.view-compact { gap: 7px; }
.bot-list.view-compact .bot-card {
  display: block;
  min-height: 0;
  padding: 7px 8px;
  border-radius: 7px;
  border-width: 1px;
  box-shadow: 0 3px 10px rgba(33,44,70,.07);
}
.bot-list.view-compact .bot-status-line { margin-bottom: 3px; }
.bot-list.view-compact .bot-head { margin: 0 0 4px; min-width: 0; }
.bot-list.view-compact .bot-seq { min-width: 24px; height: 24px; margin-right: 7px; border-radius: 5px; }
.bot-list.view-compact .bot-name { font-size: 14px; min-width: 0; }
.bot-list.view-compact .bot-info-grid { display: none; }
.bot-list.view-compact .bot-remark-line {
  display: flex;
  margin: 4px 0 0;
  padding-top: 4px;
}
.bot-list.view-compact .bot-remaining-inline { flex-basis: 76px; padding: 3px 5px; }
.bot-list.view-compact .bot-remaining-inline span,
.bot-list.view-compact .bot-remaining-inline b { font-size: 9px; }
.bot-list.view-compact .bot-remark-editor {
  margin: 0;
  padding-top: 4px;
  border-top: 0;
}
.bot-list.view-compact .bot-remark-label { display: none; }
.bot-list.view-compact .bot-remark-input { height: 30px; min-height: 30px; padding: 6px 8px; resize: none; }
.bot-list.view-compact .bot-remark-save { min-width: 48px; border-radius: 7px; font-size: 11px; }
.bot-list.view-compact .bot-remark-status { display: none; }
.bot-list.view-compact .bot-meta-primary {
  grid-column: 1;
  display: flex;
  gap: 5px 12px;
  overflow: hidden;
  line-height: 1.3;
  white-space: nowrap;
}
.bot-list.view-compact .bot-meta-primary span { overflow: hidden; text-overflow: ellipsis; }
.bot-list.view-compact .bot-meta-primary span:nth-child(2) { display: none; }
.bot-list.view-compact .bot-meta-secondary { display: none; }
.bot-list.view-compact .bot-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 6px; gap: 4px; }
.bot-list.view-compact .bot-actions button { height: 29px; padding: 4px 2px; border-radius: 999px; font-size: 11px; box-shadow: none; }

/* Grid view: three columns on phones, responsive on wider management screens. */
.bot-list.view-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.bot-list.view-grid .bot-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 138px;
  padding: 10px 8px;
  border-radius: 7px;
  border-width: 1px;
  box-shadow: 0 4px 12px rgba(33,44,70,.08);
}
.bot-list.view-grid .bot-status-line { display: block; min-height: 0; }
.bot-list.view-grid .bot-status-left,
.bot-list.view-grid .bot-status-right { gap: 3px; }
.bot-list.view-grid .bot-status-right { margin-top: 3px; justify-content: flex-start; }
.bot-list.view-grid .state-tag { max-width: 100%; padding: 3px 5px; font-size: 8px; }
.bot-list.view-grid .bot-head { display: block; margin-bottom: 6px; }
.bot-list.view-grid .bot-title-line { margin-bottom: 7px; }
.bot-list.view-grid .bot-seq { min-width: 22px; height: 22px; margin-right: 5px; border-radius: 5px; font-size: 11px; }
.bot-list.view-grid .bot-name { min-width: 0; font-size: 12px; }
.bot-list.view-grid .badge { display: inline-block; max-width: 100%; padding: 3px 6px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-list.view-grid .bot-info-grid { grid-template-columns: 1fr; gap: 3px; margin-top: 0; }
.bot-list.view-grid .bot-info-item { padding: 4px 5px; border-radius: 5px; }
.bot-list.view-grid .bot-info-item span { display: inline; margin-right: 3px; font-size: 9px; }
.bot-list.view-grid .bot-info-item b { display: inline; font-size: 10px; }
.bot-list.view-grid .bot-info-item:nth-child(n+4) { display: none; }
.bot-list.view-grid .bot-remark-line { margin-top: 6px; padding-top: 6px; }
.bot-list.view-grid .bot-remaining-inline { flex-basis: 56px; padding: 3px 4px; }
.bot-list.view-grid .bot-remaining-inline span,
.bot-list.view-grid .bot-remaining-inline b { font-size: 8px; }
.bot-list.view-grid .bot-remark-editor { min-width: 0; }
.bot-list.view-grid .bot-remark-label { margin-bottom: 3px; font-size: 10px; }
.bot-list.view-grid .bot-remark-row { display: block; }
.bot-list.view-grid .bot-remark-input { width: 100%; box-sizing: border-box; min-height: 28px; height: 28px; padding: 4px 5px; resize: none; font-size: 10px; }
.bot-list.view-grid .bot-remark-save { width: 100%; min-height: 25px; margin-top: 3px; border-radius: 5px; font-size: 10px; }
.bot-list.view-grid .bot-remark-status { display: none; }
.bot-list.view-grid .bot-meta-primary span:nth-child(2),
.bot-list.view-grid .bot-meta-secondary { display: none; }
.bot-list.view-grid .bot-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: auto; display: grid; gap: 4px; }
.bot-list.view-grid .bot-actions button { width: 100%; height: 27px; padding: 4px 2px; border-radius: 6px; font-size: 10px; box-shadow: none; }
.bot-list.view-grid .card-login-btn { grid-column: 1 / -1; }
.card-login-btn:active,
.card-room-btn:active,
.card-manage-btn:active,
.card-friend-btn:active,
.console-bot-btn:active,
.renew-bot-btn:active,
.switch-bot-btn:active {
  transform: scale(0.98);
}
.page-title { font-size: 20px; font-weight: 900; margin: 4px 2px 14px; }
.row-title { display: flex; align-items: center; justify-content: space-between; }
.mobile-form, .control-form { display: grid; gap: 12px; }
.mobile-form label, .control-form label {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}
.mobile-form input, .control-form input {
  border: 0;
  outline: 0;
  padding: 13px 14px;
  border-radius: 16px;
  color: #1d2738;
  background: #fff;
  box-shadow: 0 8px 20px rgba(33,44,70,.06);
}
.selected-title { color: #7c879b; font-size: 12px; }
.selected-name { margin-top: 4px; font-size: 18px; font-weight: 900; }
.action-section {
  margin-top: 14px;
  background: #fff;
  padding: 14px;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(33,44,70,.07);
}
.action-title { font-size: 15px; font-weight: 900; margin-bottom: 10px; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-grid button {
  border: 0;
  border-radius: 14px;
  padding: 11px 6px;
  background: #f0f3f8;
  color: #344054;
  font-weight: 800;
}
.action-grid button.blue { color: #fff; background: #3478ff; }
.action-grid button.red { color: #fff; background: #e64d62; }
.admin-form input {
  width: 100%;
  height: 44px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: #f0f3f8;
  color: #1d2738;
  font-size: 14px;
  box-sizing: border-box;
}
.admin-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.admin-btn-row button {
  border: 0;
  border-radius: 14px;
  padding: 11px 6px;
  background: #f0f3f8;
  color: #344054;
  font-weight: 800;
}
.admin-btn-row button.blue { color: #fff; background: #3478ff; }
.admin-btn-row button.red { color: #fff; background: #e64d62; }
.admin-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}
.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: #e8f0ff;
  font-size: 12px;
  font-weight: 800;
}
.admin-chip button {
  border: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #fff;
  background: #e64d62;
  line-height: 18px;
}
.empty-tip { color: #7c879b; font-size: 12px; }

/* ?????????? */
#pageControl { display: none; }
#pageControl.active {
  display: grid;
  gap: 14px;
}
#pageControl .selected-card,
#pageControl .action-section {
  margin: 0;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  border: 1px solid #edf1f7;
  box-shadow: 0 12px 28px rgba(28, 43, 74, .06);
}
#pageControl .selected-card { padding: 17px 18px; }
#pageControl .selected-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7b8798;
  font-size: 12px;
  font-weight: 700;
}
#pageControl .selected-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #3478ff;
  box-shadow: 0 0 0 4px rgba(52,120,255,.12);
}
#pageControl .selected-name {
  margin-top: 8px;
  color: #071a3a;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .2px;
}
#pageControl .action-section { padding: 16px; }
#pageControl .action-title {
  margin-bottom: 14px;
  color: #071a3a;
  font-size: 16px;
  font-weight: 900;
}
#pageControl .action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
#pageControl .action-grid button,
#pageControl .admin-btn-row button {
  min-height: 42px;
  border-radius: 15px;
  font-size: 14px;
  letter-spacing: .2px;
  box-shadow: none;
}
#pageControl .action-grid button[data-action="login"],
#pageControl .admin-btn-row button.blue {
  color: #fff;
  background: linear-gradient(135deg, #3b7cff, #2764ec);
  box-shadow: 0 8px 18px rgba(52,120,255,.18);
}
#pageControl .action-grid button[data-action="logout"] {
  color: #334155;
  background: #eef3fa;
}
#pageControl .admin-form input {
  height: 46px;
  border-radius: 15px;
  background: #f7f9fd;
  border: 1px solid #edf1f7;
  color: #10213d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
#pageControl .admin-form input:focus {
  border-color: rgba(52,120,255,.45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(52,120,255,.09);
}
#pageControl .admin-btn-row {
  gap: 12px;
  margin-top: 12px;
}
#pageControl .admin-btn-row button.red {
  color: #fff;
  background: linear-gradient(135deg, #f04f6a, #df435b);
  box-shadow: 0 8px 18px rgba(224,67,91,.16);
}
#pageControl .admin-list {
  margin-top: 14px;
  padding-top: 2px;
  gap: 9px;
}
#pageControl .admin-chip {
  padding: 7px 9px 7px 11px;
  color: #2563eb;
  background: #eef5ff;
  border: 1px solid #deebff;
}
#pageControl .admin-chip button {
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  background: #f05b72;
}
#pageControl .empty-tip {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 12px;
  color: #8792a4;
  background: #f7f9fd;
}

.mobile-log {
  height: 650px;
  max-height: calc(100vh - 240px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  color: #d8ffe9;
  background: #101827;
  font-size: 12px;
  line-height: 1.55;
  font-family: Consolas, "Microsoft YaHei", monospace;
}
.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #fa436a, #ffb347);
  font-size: 30px;
}
.profile-name { font-size: 19px; font-weight: 900; }
.profile-sub { color: #7c879b; font-size: 13px; margin-top: 4px; }
.info-list {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(33,44,70,.07);
}
.info-list div {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #eef1f6;
  color: #667085;
}
.info-list div:last-child { border-bottom: 0; }
.info-list b { color: #1d2738; }
.red-btn { background: linear-gradient(135deg, #e64d62, #ff7a45); }
.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96);
  border-top: 1px solid #e8edf5;
  box-shadow: 0 -10px 30px rgba(33,44,70,.08);
}
.nav-item {
  border: 0;
  background: transparent;
  color: #8792a6;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.nav-item span { font-size: 20px; }
.nav-item.active { color: #fa436a; }
@media (max-width: 520px) {
  .desktop-bg { padding: 0; }
  .phone-shell { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
}
@media (max-width: 380px) {
  .app-content { padding-left: 10px; padding-right: 10px; }
  .bot-card { padding: 6px; }
  .state-tag { max-width: 108px; padding: 3px 5px; font-size: 9px; }
  .bot-actions { gap: 4px; }
  .bot-actions button { height: 30px; font-size: 11px; }
  .bot-remaining-inline { flex-basis: 78px; }
}
.mobile-form select {
  border: 0;
  outline: 0;
  padding: 13px 14px;
  border-radius: 16px;
  color: #1d2738;
  background: #fff;
  box-shadow: 0 8px 20px rgba(33,44,70,.06);
}
.worker-form {
  margin-bottom: 16px;
}
.gray-btn {
  margin-top: 10px;
  background: linear-gradient(135deg, #607089, #344054);
  box-shadow: 0 12px 30px rgba(52,64,84,.18);
}
.worker-result {
  min-height: 110px;
  max-height: 220px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
}


/* ????????????????? */
#pageControl .admin-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 86px;
  gap: 10px;
  align-items: center;
}

#pageControl .admin-super-btn {
  background: linear-gradient(135deg, #6d5dfc, #3b7cff) !important;
}
#pageControl .admin-chip.super {
  color: #7c3aed;
  background: #f3edff;
  border-color: #e8dcff;
}
#pageControl .admin-role {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #3478ff;
  font-size: 12px;
  font-weight: 900;
}
#pageControl .admin-chip.super .admin-role {
  background: #7c3aed;
}

#pageControl .admin-inline-row button {
  height: 46px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #3b7cff, #2764ec);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(52,120,255,.18);
}
@media (max-width: 380px) {
  #pageControl .admin-inline-row { grid-template-columns: 1fr; }
}
#pageControl .room-bind-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
}
#pageControl .room-bind-row input {
  width: 100%;
  height: 46px;
  border: 1px solid #edf1f7;
  border-radius: 15px;
  background: #f7f9fd;
  padding: 0 13px;
  color: #071a3a;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
#pageControl .room-bind-row input:focus {
  border-color: rgba(52,120,255,.45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(52,120,255,.09);
}
#pageControl .room-bind-row button {
  height: 46px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #3b7cff, #2764ec);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(52,120,255,.18);
}
#pageControl .action-help {
  margin-top: 9px;
  color: #7b8798;
  font-size: 12px;
  line-height: 1.55;
}
@media (max-width: 380px) {
  #pageControl .room-bind-row { grid-template-columns: 1fr; }
}
#pageControl .room-bind-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 76px;
}
@media (max-width: 430px) {
  #pageControl .room-bind-row { grid-template-columns: 1fr; }
}
.oauth-login-panel {
  padding: 22px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 8px;
}
.oauth-provider-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #12b7f5;
  font-size: 20px;
  font-weight: 900;
}
.oauth-login-title { color: #1d2738; font-weight: 800; }
.qq-login-btn { margin-top: 18px; background: #12b7f5; }
.qq-login-qr {
  display: block;
  width: 190px;
  height: 190px;
  margin: 18px auto 0;
  border: 1px solid #e5e7eb;
  background: #fff;
  object-fit: contain;
}
.oauth-login-status { min-height: 20px; margin-top: 12px; color: #667085; font-size: 13px; }
.add-login-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #e9edf5;
}
.add-login-tabs button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  color: #667085;
  background: transparent;
  min-width: 0;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
}
.add-login-tabs button.active {
  color: #fff;
  background: #fa436a;
  box-shadow: 0 5px 12px rgba(250, 67, 106, .2);
}
.code-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}
.code-login-row input { width: 100%; }
.code-login-row button {
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #3478ff;
  font-size: 13px;
  font-weight: 800;
}

#pageControl .friend-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
}
#pageControl .friend-request-row input {
  width: 100%;
  height: 46px;
  border: 1px solid #edf1f7;
  border-radius: 15px;
  background: #f7f9fd;
  padding: 0 13px;
  color: #071a3a;
  font-size: 14px;
  outline: none;
}
#pageControl .friend-request-row input:focus {
  border-color: rgba(52,120,255,.45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(52,120,255,.09);
}
#pageControl .friend-request-row button {
  height: 46px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #3b7cff, #2764ec);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(52,120,255,.18);
}
@media (max-width: 380px) {
  #pageControl .friend-request-row { grid-template-columns: 1fr; }
}

#pageControl .gift-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: center;
}
#pageControl .gift-query-row input {
  width: 100%;
  height: 46px;
  border: 1px solid #edf1f7;
  border-radius: 15px;
  background: #f7f9fd;
  padding: 0 13px;
  color: #071a3a;
  font-size: 14px;
}
#pageControl .gift-query-row button {
  height: 46px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #3b7cff, #2764ec);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(52,120,255,.18);
}
#pageControl .gift-result {
  margin: 12px 0 0;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 15px;
  background: #f7f9fd;
  border: 1px solid #edf1f7;
  padding: 12px;
  color: #43536d;
  font-size: 12px;
  line-height: 1.55;
}
@media (max-width: 430px) {
  #pageControl .gift-query-row { grid-template-columns: 1fr; }
}

.gift-page-card .gift-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 76px;
  gap: 10px;
  align-items: center;
}
.gift-page-card .gift-query-row input {
  width: 100%;
  height: 46px;
  border: 1px solid #edf1f7;
  border-radius: 15px;
  background: #f7f9fd;
  padding: 0 13px;
  color: #071a3a;
  font-size: 14px;
}
.gift-page-card .gift-query-row button {
  height: 46px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #3b7cff, #2764ec);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(52,120,255,.18);
}
.gift-page-card .gift-result {
  margin: 12px 0 0;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 15px;
  background: #f7f9fd;
  border: 1px solid #edf1f7;
  padding: 12px;
  color: #43536d;
  font-size: 12px;
  line-height: 1.55;
}
@media (max-width: 430px) {
  .gift-page-card .gift-query-row { grid-template-columns: 1fr; }
}

/* Remark values are read-only on cards; editing happens in the feature modal. */
.bot-list.view-compact .bot-remark-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.bot-list.view-compact .bot-remark-edit { min-width: 58px; }
.bot-list.view-grid .bot-remark-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.bot-list.view-grid .bot-remark-display { min-width: 0; }
.bot-list.view-grid .bot-remark-edit { min-width: 52px; }
.bot-list.view-grid .bot-remaining-inline {
  grid-column: 1 / -1;
  width: 100%;
}

/* Detail cards keep all fields while using roughly 75% of the previous height. */
.bot-list.view-detail { gap: 7px; }
.bot-list.view-detail .bot-card {
  padding: 6px;
  border-radius: 9px;
}
.bot-list.view-detail .bot-status-line {
  min-height: 15px;
  margin-bottom: 0;
  gap: 4px;
}
.bot-list.view-detail .bot-status-left,
.bot-list.view-detail .bot-status-right { gap: 4px; }
.bot-list.view-detail .state-tag {
  gap: 3px;
  padding: 2px 5px;
  font-size: 9px;
}
.bot-list.view-detail .state-tag::before {
  flex-basis: 6px;
  width: 6px;
  height: 6px;
}
.bot-list.view-detail .bot-head { margin-bottom: 1px; }
.bot-list.view-detail .bot-seq {
  min-width: 20px;
  height: 20px;
  margin-right: 4px;
  font-size: 11px;
  box-shadow: 0 3px 8px rgba(59,124,255,.2);
}
.bot-list.view-detail .bot-name { gap: 5px; font-size: 13px; line-height: 1.05; }
.bot-list.view-detail .bot-name small { font-size: 9px; }
.bot-list.view-detail .bot-info-grid { gap: 1px 4px; }
.bot-list.view-detail .bot-info-item {
  padding: 2px 5px;
  border-radius: 5px;
  line-height: 1.1;
}
.bot-list.view-detail .bot-info-item span {
  margin-right: 4px;
  font-size: 9px;
}
.bot-list.view-detail .bot-info-item b { font-size: 9px; }
.bot-list.view-detail .bot-remark-line {
  gap: 4px;
  margin-top: 3px;
  padding-top: 2px;
}
.bot-list.view-detail .bot-remark-display { padding: 2px 5px; }
.bot-list.view-detail .bot-remark-edit {
  min-width: 48px;
  height: 23px;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 9px;
}
.bot-list.view-detail .bot-remaining-inline {
  flex-basis: 80px;
  padding: 2px 4px;
  line-height: 1.05;
}
.bot-list.view-detail .bot-remaining-inline span { font-size: 8px; }
.bot-list.view-detail .bot-remaining-inline b { font-size: 9px; }
.bot-list.view-detail .bot-actions {
  gap: 5px;
  margin-top: 4px;
}
.bot-list.view-detail .bot-actions button {
  height: 29px;
  padding: 3px 2px;
  font-size: 12px;
}
