/* Trang "Công cụ của robot" — bật/tắt theo từng máy. */

.dt-head {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dt-picker {
  flex: 1 1 260px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 12px;
}

.dt-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #888;
  margin-bottom: 5px;
}

.dt-select {
  width: 100%;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: #eee;
  font-size: 14px;
  padding: 7px 9px;
  outline: none;
}

.dt-select:focus { border-color: rgba(180,80,255,.55); }

/* Ví hiện theo TỪNG MÁY, không gộp cả tài khoản: nạp cho robot nào thì chỉ
   robot đó dùng được, nên một con số tổng sẽ nói sai về tiền của khách. */
.dt-wallet {
  flex: 0 1 240px;
  background: rgba(255,180,40,.07);
  border: 1px solid rgba(255,180,40,.22);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dt-wallet-num { font-size: 19px; font-weight: 700; color: #ffc94d; }
.dt-wallet-sub { font-size: 11px; color: #9a9a9a; margin-top: 2px; }

.dt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.dt-count { font-size: 13px; color: #bbb; }
.dt-count b { color: #4ade80; font-size: 15px; }

.dt-actions { display: flex; gap: 8px; }

.dt-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #ddd;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.dt-btn:hover { background: rgba(180,80,255,.16); border-color: rgba(180,80,255,.4); }

.dt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.dt-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 11px 13px;
  transition: opacity .15s, border-color .15s;
}

/* Tool đang tắt vẫn hiện (mờ đi) chứ không ẩn — ẩn thì không bật lại được. */
.dt-card.off { opacity: .5; }

.dt-card-top { display: flex; align-items: center; gap: 9px; }
.dt-icon { font-size: 19px; width: 24px; text-align: center; }
.dt-name { flex: 1; font-size: 13px; color: #eee; font-weight: 600; }

.dt-desc {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
  line-height: 1.45;
}

.dt-lock {
  font-size: 10px;
  color: #d9a441;
  margin-top: 7px;
  line-height: 1.45;
  background: rgba(255,180,40,.07);
  border-radius: 6px;
  padding: 5px 7px;
}

/* ---- switch ---- */
.dt-switch { position: relative; width: 38px; height: 21px; flex: none; }
.dt-switch input { opacity: 0; width: 0; height: 0; }

.dt-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.16);
  border-radius: 21px;
  cursor: pointer;
  transition: background .18s;
}

.dt-slider::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s;
}

.dt-switch input:checked + .dt-slider { background: #7c3aed; }
.dt-switch input:checked + .dt-slider::before { transform: translateX(17px); }
.dt-switch.locked .dt-slider { cursor: not-allowed; opacity: .55; }

.dt-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 26px;
  color: #777;
  font-size: 13px;
}

.dt-link { color: #b46cff; text-decoration: none; margin-left: 6px; }
.dt-link:hover { text-decoration: underline; }

/* ---- toast ---- */
.toast-box {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: rgba(24,24,32,.97);
  border: 1px solid rgba(255,255,255,.14);
  border-left-width: 3px;
  color: #eee;
  font-size: 13px;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  max-width: 330px;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-left-color: #4ade80; }
.toast-error   { border-left-color: #f87171; }
.toast-info    { border-left-color: #60a5fa; }

/* Nói rõ hiệu lực tức thì đến từ cổng chặn, không từ thông báo cho broker.
   Đo 2026-09-20: broker xiaozhi.me không xin lại tools/list khi nhận
   notifications/tools/list_changed. */
.dt-note {
  font-size: 11px;
  color: #9ab4d8;
  background: rgba(96,165,250,.08);
  border: 1px solid rgba(96,165,250,.2);
  border-radius: 8px;
  padding: 8px 11px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.dt-note b { color: #cfe2ff; }
