/* Resultado del bot en la tarjeta del pedido: encabezado con el reintento a la derecha, el producto como fila con
   su estado en una pastilla y las cuentas como fichas (en vez de una lista larga separada por comas). */
body #adminDashboard .order-bot-status { gap: 10px !important; }
body #adminDashboard .order-bot-status .order-bot-heading { flex-wrap: wrap; gap: 8px 10px !important; }
body #adminDashboard .order-bot-status .order-bot-heading > .order-bot-retry {
  width: auto !important; min-height: 34px !important; margin: 0 0 0 auto !important; padding: 0 14px !important;
  display: inline-flex !important; align-items: center; gap: 6px; border-radius: 999px !important;
  font-size: 13px !important; font-weight: 700 !important; white-space: nowrap;
}
body #adminDashboard .order-bot-status .order-bot-heading > .order-bot-retry svg { width: 15px; height: 15px; }

body #adminDashboard .order-bot-status .order-unit-outcomes > li {
  margin: 0 !important; padding: 12px 14px !important; border: 0 !important; border-radius: 10px !important;
  background: rgba(0, 0, 0, .18) !important;
}
:root[data-admin-theme="light"] body #adminDashboard .order-bot-status .order-unit-outcomes > li { background: rgba(255, 255, 255, .7) !important; }
body #adminDashboard .order-bot-status .order-unit-outcomes > li > strong { font-size: 14px; }
body #adminDashboard .order-bot-status .order-unit-outcomes > li > strong small { font-size: 13px; font-weight: 600; color: var(--admin-muted); }
body #adminDashboard .order-bot-status .order-unit-outcomes > li > .unit-state {
  justify-self: end; padding: 3px 10px; border-radius: 999px; font-size: 12px !important;
  background: rgba(255, 255, 255, .1); color: var(--admin-text) !important;
}
:root[data-admin-theme="light"] body #adminDashboard .order-bot-status .order-unit-outcomes > li > .unit-state { background: rgba(11, 27, 58, .08); }

body #adminDashboard .order-bot-reasons li.reason-block { display: grid !important; gap: 8px; padding: 10px 0 2px !important; border: 0 !important; }
body #adminDashboard .order-bot-reasons li.reason-block .reason-what { font-size: 14px !important; font-weight: 700 !important; }
body #adminDashboard .order-bot-reasons .reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body #adminDashboard .order-bot-reasons .reason-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px; line-height: 1.4; color: var(--admin-text); white-space: nowrap;
}
body #adminDashboard .order-bot-reasons .reason-chip b { font-weight: 700; }
body #adminDashboard .order-bot-reasons .reason-chip time { color: #ffc95c; font-weight: 600; }
body #adminDashboard .order-bot-reasons .is-unaccepted .reason-chip { border-color: rgba(255, 120, 100, .35); background: rgba(255, 120, 100, .1); }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .reason-chip { background: #fff; border-color: rgba(11, 27, 58, .12); }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .reason-chip time { color: #8a5a00; }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .is-unaccepted .reason-chip { background: #fff1ee; border-color: rgba(200, 60, 40, .25); }
body #adminDashboard .order-bot-reasons li.reason-block .reason-todo {
  max-width: none !important; font-size: 12.5px !important; font-weight: 500 !important; color: var(--admin-muted) !important;
}
body #adminDashboard .order-bot-status .order-unit-outcomes > li > strong { color: var(--admin-text) !important; font-weight: 700 !important; }

@media (max-width: 640px) {
  body #adminDashboard .order-bot-status .order-bot-heading > .order-bot-retry { flex: 1 0 100%; justify-content: center; margin: 2px 0 0 !important; }
}

/* ===== Rediseño 2026-11-28: espera de amistad y «sin amistad» ===== */
/* Una sola columna (admin-dispatch.css las ponía en dos y el bloque corto se estiraba: el chip «Lotsox2» salía
   como un óvalo alto). */
body #adminDashboard .order-bot-reasons.is-structured {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; margin: 6px 0 0 !important;
}
body #adminDashboard .order-bot-reasons.is-structured > li.reason-block { align-content: start; padding: 0 !important; }
body #adminDashboard .order-bot-reasons .reason-chips { align-items: flex-start; }
body #adminDashboard .order-bot-reasons .reason-chip { align-self: flex-start; height: auto; }

body #adminDashboard .order-bot-reasons .wait-card {
  display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 201, 92, .12), rgba(255, 201, 92, .04));
  border: 1px solid rgba(255, 201, 92, .28);
}
body #adminDashboard .order-bot-reasons .wait-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
body #adminDashboard .order-bot-reasons .wait-icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 201, 92, .16); color: #ffc95c;
}
body #adminDashboard .order-bot-reasons .wait-icon svg { width: 24px; height: 24px; }
body #adminDashboard .order-bot-reasons .wait-copy { display: grid; gap: 1px; min-width: 0; flex: 1 1 220px; }
body #adminDashboard .order-bot-reasons .wait-kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ffc95c;
}
body #adminDashboard .order-bot-reasons .wait-time { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--admin-text); }
body #adminDashboard .order-bot-reasons .wait-when { font-size: 13px; font-weight: 500; color: var(--admin-muted); }
body #adminDashboard .order-bot-reasons .wait-actions { margin-left: auto; display: inline-flex; gap: 6px; }
body #adminDashboard .order-bot-reasons .wait-bar {
  display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden;
}
body #adminDashboard .order-bot-reasons .wait-bar > span {
  display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb340, #ffd77a);
}
body #adminDashboard .order-bot-reasons .wait-accounts > summary {
  cursor: pointer; width: fit-content; font-size: 12.5px; font-weight: 600; color: var(--admin-muted); list-style: none;
}
body #adminDashboard .order-bot-reasons .wait-accounts > summary::-webkit-details-marker { display: none; }
body #adminDashboard .order-bot-reasons .wait-accounts > summary::before { content: "▸ "; }
body #adminDashboard .order-bot-reasons .wait-accounts[open] > summary::before { content: "▾ "; }
body #adminDashboard .order-bot-reasons .wait-accounts > .reason-chips { margin-top: 10px; }
body #adminDashboard .order-bot-reasons .is-wait > .reason-todo { padding: 0 4px; }
/* Ya cumplido: verde */
body #adminDashboard .order-bot-reasons .is-ready .wait-card { background: rgba(80, 200, 120, .1); border-color: rgba(80, 200, 120, .35); }
body #adminDashboard .order-bot-reasons .is-ready .wait-icon { background: rgba(80, 200, 120, .16); color: #6ee49a; }
body #adminDashboard .order-bot-reasons .is-ready .wait-kicker { color: #6ee49a; }
body #adminDashboard .order-bot-reasons .is-ready .wait-bar > span { background: #6ee49a; }

/* Sin amistad: una línea compacta */
body #adminDashboard .order-bot-reasons .unaccepted-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body #adminDashboard .order-bot-reasons .is-unaccepted { gap: 4px !important; }
body #adminDashboard .order-bot-reasons .is-unaccepted .reason-what { font-size: 13px !important; }

:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .wait-card { background: #fff8e8; border-color: rgba(190, 130, 0, .3); }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .wait-icon { background: #ffefc7; color: #9a6400; }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .wait-kicker { color: #9a6400; }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .wait-bar { background: rgba(11, 27, 58, .08); }

@media (max-width: 640px) {
  body #adminDashboard .order-bot-reasons .wait-actions { margin-left: 0; width: 100%; }
  body #adminDashboard .order-bot-reasons .wait-actions > .order-gift-receipt { flex: 1; }
  body #adminDashboard .order-bot-reasons .wait-time { font-size: 20px; }
}

/* Botones del aviso (las reglas originales solo aplican en el encabezado del bot) */
body #adminDashboard .order-bot-reasons .wait-actions > :is(.order-gift-receipt, .order-gift-view) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border: 1px solid rgba(255, 201, 92, .6); border-radius: 999px; background: transparent; color: #ffc95c;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
body #adminDashboard .order-bot-reasons .wait-actions > .order-gift-view { width: 36px; padding: 0; }
body #adminDashboard .order-bot-reasons .wait-actions > .order-gift-view svg { width: 16px; height: 16px; }
body #adminDashboard .order-bot-reasons .wait-actions > :is(.order-gift-receipt, .order-gift-view):hover { background: rgba(255, 201, 92, .12); }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-reasons .wait-actions > :is(.order-gift-receipt, .order-gift-view) { color: #8a5a00; border-color: rgba(138, 90, 0, .45); }

/* ===== Vista SIMPLE de espera de amistad (rediseño total 2026-11-28) ===== */
body #adminDashboard .order-bot-status.bot-simple {
  display: grid !important; gap: 14px !important; padding: 18px 20px !important; border-radius: 16px !important;
  background: rgba(255, 201, 92, .07) !important; border: 1px solid rgba(255, 201, 92, .28) !important; box-shadow: none !important;
}
body #adminDashboard .order-bot-status.bot-simple::before { display: none !important; }
body #adminDashboard .bot-simple-main { display: flex; align-items: center; gap: 16px; }
body #adminDashboard .bot-simple-icon {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 201, 92, .16); color: #ffc95c;
}
body #adminDashboard .bot-simple-icon svg { width: 28px; height: 28px; }
body #adminDashboard .bot-simple-text { display: grid; gap: 2px; min-width: 0; }
body #adminDashboard .bot-simple-kicker { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #ffc95c; }
body #adminDashboard .bot-simple-text strong { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--admin-text); }
body #adminDashboard .bot-simple-text > span:last-child { font-size: 14px; color: var(--admin-muted); }
body #adminDashboard .bot-simple-text > span:last-child::first-letter { text-transform: uppercase; }
body #adminDashboard .bot-simple-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
body #adminDashboard .bot-simple-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb340, #ffd77a); }
body #adminDashboard .bot-simple-actions { display: flex; gap: 8px; }
body #adminDashboard .bot-simple-actions > :is(.bot-simple-copy, .order-bot-retry) {
  flex: 1; display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px !important; margin: 0 !important; padding: 0 18px !important; border: 0 !important; border-radius: 999px !important;
  background: #ffc95c !important; color: #1d1404 !important; font: inherit; font-size: 14px !important; font-weight: 800 !important; cursor: pointer;
}
body #adminDashboard .bot-simple-actions > .bot-simple-view {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 201, 92, .55); background: transparent; color: #ffc95c; cursor: pointer;
}
body #adminDashboard .bot-simple-actions > .bot-simple-view svg { width: 18px; height: 18px; }
/* Listo: verde */
body #adminDashboard .order-bot-status.bot-simple.is-ready { background: rgba(80, 200, 120, .08) !important; border-color: rgba(80, 200, 120, .35) !important; }
body #adminDashboard .bot-simple.is-ready :is(.bot-simple-icon, .bot-simple-kicker) { color: #6ee49a; }
body #adminDashboard .bot-simple.is-ready .bot-simple-icon { background: rgba(80, 200, 120, .16); }
body #adminDashboard .bot-simple.is-ready .bot-simple-bar > span { background: #6ee49a; }
body #adminDashboard .bot-simple.is-ready .bot-simple-actions > .order-bot-retry { background: #6ee49a !important; color: #062312 !important; }
:root[data-admin-theme="light"] body #adminDashboard .order-bot-status.bot-simple { background: #fff8e8 !important; border-color: rgba(190, 130, 0, .3) !important; }
:root[data-admin-theme="light"] body #adminDashboard :is(.bot-simple-kicker, .bot-simple-icon) { color: #9a6400; }
:root[data-admin-theme="light"] body #adminDashboard .bot-simple-bar { background: rgba(11, 27, 58, .08); }
@media (max-width: 640px) {
  body #adminDashboard .bot-simple-text strong { font-size: 22px; }
  body #adminDashboard .bot-simple-icon { width: 44px; height: 44px; }
}

/* Ventana «Editar nicks» */
.player-editor-dialog { width: min(560px, calc(100% - 32px)) !important; overflow: auto; }
.player-editor-dialog fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 0 0 14px; padding: 12px 14px 4px; border: 1px solid #3d4048; border-radius: 10px; }
.player-editor-dialog legend { padding: 0 6px; font-weight: 700; color: #f5f5f7; }
.player-editor-dialog label { margin: 8px 0 !important; font-size: 13px; }
.player-editor-dialog .player-editor-help { margin: 4px 0 0; font-size: 13px; color: #9aa0ad; }
.player-editor-dialog form > div:last-child { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
@media (max-width: 520px) { .player-editor-dialog fieldset { grid-template-columns: minmax(0, 1fr); } }
