:root {
  color-scheme: dark;
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9edf8;
  background: #0a1020;
  --surface: #141e30;
  --line: #30405b;
  --muted: #aab8d0;
  --gold: #f2d18b;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at top, #222c48, #0a1020 62%); }
[hidden] { display: none !important; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 10px; }
button { background: #1d2940; color: #eef3ff; padding: 10px 14px; font-weight: 650; cursor: pointer; }
button:hover { background: #283957; }
button:disabled { opacity: .55; cursor: wait; }
button.primary { background: linear-gradient(120deg, #c99a4d, #f2d18b); color: #171310; border-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
input, select, textarea { background: #10192b; color: #fff; padding: 10px 12px; min-width: 0; width: 100%; }
textarea { resize: vertical; }
label { display: grid; gap: 5px; color: var(--muted); font-size: .9rem; }
label > :is(input,select,textarea) { font-size: 1rem; }
h1, h2, p { margin: 0 0 .7rem; }
h1 { line-height: 1.2; font-size: clamp(1.65rem, 4vw, 2.45rem); }
h2 { font-size: 1.12rem; }
p, small { color: var(--muted); overflow-wrap: anywhere; }
.top { min-height: 76px; padding: 12px clamp(14px, 4vw, 60px); display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #10182a; }
.identity { display: flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .07em; line-height: 1.25; }
.identity small { display: block; font-size: .72rem; margin-top: 4px; }
.monogram { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: #252b3a; border: 1px solid #6e5736; font-family: Georgia, serif; }
.top-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.badge { border: 1px solid #705a39; color: var(--gold); background: #282630; border-radius: 999px; padding: 4px 10px; font-size: .875rem; }
main { width: min(1180px, 100%); margin: auto; padding: clamp(14px, 4vw, 40px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(15px, 3vw, 26px); min-width: 0; }
.access { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; max-width: 870px; margin: clamp(16px, 9vh, 90px) auto; }
.access .intro { display: grid; align-content: center; background: linear-gradient(155deg, #202b44, #111a2b); }
form, .stack { display: grid; gap: 12px; }
.section-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: start; justify-content: space-between; }
.section-head h1 { margin-bottom: 4px; }
.thread { display: flex; flex-direction: column; gap: 12px; height: clamp(220px, 43dvh, 520px); overflow: auto; padding: 10px 3px; overscroll-behavior: contain; }
.bubble { border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; max-width: min(90%, 620px); background: #19263b; align-self: start; overflow-wrap: anywhere; }
.bubble p { margin: 4px 0 0; color: inherit; white-space: pre-wrap; }
.bubble strong { color: var(--gold); font-size: .85rem; }
.bubble.client { align-self: end; background: #243651; }
.bubble.system { background: #252b3a; }
.bubble img { display: block; max-width: 100%; max-height: 290px; object-fit: contain; margin-top: 8px; border-radius: 8px; }
.composer { border-top: 1px solid var(--line); padding-top: 14px; }
summary { padding: 9px 0; cursor: pointer; color: var(--gold); font-weight: 650; }
details form { margin-top: 8px; }
.items { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.item { text-align: left; overflow-wrap: anywhere; }
.item[aria-current="true"] { color: var(--gold); border-color: #9e7c46; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 20px; }
.metrics strong { color: var(--gold); }
.record { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.record p { margin: 0 0 5px; }
#status:not(:empty) { position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); right: 14px; max-width: min(440px, calc(100% - 28px)); border: 1px solid #846943; background: #252b3a; border-radius: 12px; padding: 12px 16px; z-index: 2; }
.credentials { border-color: #846943; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .access, .admin-grid { grid-template-columns: 1fr; }
  .top .badge { display: none; }
  .thread { height: 36dvh; }
}

.chat-page { padding-top: clamp(14px, 3vw, 34px); }
.top:has(+ .chat-page) { display: none; }
.chat-shell {
  color-scheme: dark;
  color: #fbf3ff;
  border: 1px solid #552b70;
  border-radius: 22px;
  background: #1b112c;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 15px 55px #030a1259;
}
.chat-guest { max-width: 780px; margin-inline: auto; }
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(14px, 3vw, 24px);
  color: #fbfffd;
  background: linear-gradient(110deg, #371366, #6e207a 67%, #94245f);
}
.chat-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid #ffaedc;
  box-shadow: 0 0 20px #ff55b85c;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd3eb, #d2a6ff);
  color: #4a1461;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.chat-identity { flex: 1; min-width: 0; }
.chat-header h1 { font-size: 1.15rem; margin: 0 0 3px; }
.chat-header p { margin: 0; color: #f5ccef; font-size: .875rem; }
.chat-account-name {
  max-width: 42%;
  padding: 5px 9px;
  border: 1px solid #e17ec79a;
  border-radius: 9px;
  color: #ffdbf2;
  font-size: .875rem;
  text-align: right;
  overflow-wrap: anywhere;
}
.chat-account-name small { display: block; color: #f5ccef; }
.chat-account-name strong { color: #fff; }
.chat-clock, .chat-message-time { font-variant-numeric: tabular-nums; }
.chat-clock { color: #f5db9f; font-size: .83rem; white-space: nowrap; }
.chat-message-time {
  display: block;
  margin-top: 4px;
  text-align: right;
  font-size: .72rem;
  color: inherit;
  opacity: .78;
}
.chat-credentials { display: grid; gap: 8px; margin-top: 8px; }
.chat-credential {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.chat-credential small { display: block; color: #f5ccef; }
.chat-credential span { display: block; overflow-wrap: anywhere; }
.chat-shell .thread {
  height: clamp(260px, 53dvh, 650px);
  padding: clamp(14px, 3vw, 26px);
  gap: 11px;
  background-color: #171128;
  background-image:
    radial-gradient(circle at 76% 18%, #6f226b85, transparent 49%),
    radial-gradient(circle at 14% 88%, #462393a0, transparent 55%),
    radial-gradient(circle at 33px 34px, transparent 13px, #ffa9d835 14px, #ffa9d835 15px, transparent 16px, transparent 19px, #ffa9d82a 20px, transparent 21px),
    radial-gradient(circle at 117px 105px, transparent 8px, #c897ff4d 9px, transparent 10px, transparent 12px, #c897ff38 13px, transparent 14px),
    radial-gradient(circle at 79px 63px, #ffcff142 1px, transparent 2px);
  background-size: auto, auto, 154px 135px, 154px 135px, 154px 135px;
}
.chat-shell .bubble {
  max-width: min(88%, 560px);
  color: #fbf0fd;
  border: 1px solid #603d79;
  border-radius: 6px 17px 17px 17px;
  background: #302044;
  box-shadow: 0 2px 3px #0d061d58;
}
.chat-shell .bubble.client {
  background: linear-gradient(140deg, #602681, #8d276f);
  border-color: #bd519f;
  border-radius: 17px 6px 17px 17px;
}
.chat-shell .bubble.system { background: #392444; border-color: #805375; }
.chat-shell .bubble strong { color: #ffc2ec; }
.chat-shell .bubble a { color: #ffc3f5; }
.chat-typing {
  align-self: start;
  padding: 5px 10px;
  border-radius: 10px;
  background: #37224a;
  color: #ebc3f3;
  font-size: .875rem;
}
.chat-compose {
  display: grid;
  gap: 2px;
  padding: 12px clamp(12px, 3vw, 22px) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #5b376d;
}
.chat-compose form { gap: 2px; }
.message-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.chat-compose :is(input, textarea, select) {
  color: #fff1fc;
  background: #291a3a;
  border-color: #67437a;
}
.message-bar :is(input, textarea) { min-height: 46px; border-radius: 24px; resize: none; }
.chat-compose button.primary { background: linear-gradient(120deg, #9841d5, #c52685); color: white; min-height: 46px; border-radius: 22px; }
.chat-compose button.primary:hover { background: linear-gradient(120deg, #a750e4, #d33295); }
.chat-compose summary, .chat-compose label { color: #f1b8ec; }
.chat-compose :focus-visible { outline-color: #ff99dc; }
.chat-compose details > form { gap: 10px; }
@media (max-width: 700px) {
  .chat-page { padding: 0 0 16px; }
  .chat-shell { border-radius: 0 0 17px 17px; border-inline: 0; }
  .chat-shell .thread { height: clamp(220px, 49dvh, 535px); }
  .chat-guest .thread { height: clamp(240px, calc(100dvh - 160px), 760px); }
}

/* Royal-purple surfaces with warm foreground accents for the customer chat. */
.chat-shell { border-color: #af8051; background: #1d102d; }
.chat-header {
  background: radial-gradient(ellipse at 28% 5%, #63178c 1%, transparent 68%), #180b28;
  border-bottom: 1px solid #c781f8;
  box-shadow: 0 4px 18px #cb58f642;
  position: relative;
  z-index: 1;
}
.chat-avatar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  line-height: .9;
  border-color: #ffe38e;
  background: radial-gradient(circle at 35% 20%, #7432a5, #230d39 75%);
  box-shadow: 0 0 12px #fd7bd198, inset 0 0 7px #ffbb4059;
  color: #ffdd77;
  font-size: .82rem;
}
.chat-avatar span { font-size: 1.2rem; }
.chat-header h1 { font-size: 1.22rem; }
.chat-header p { color: #e4c9eb; }
.chat-shell .thread {
  display: flex;
  background-color: #160b24;
  background-image: linear-gradient(#1c0c2c32, #16091f24), url("/royal-chat.jpg");
  background-position: center;
  background-size: cover;
}
.chat-shell .bubble {
  background: linear-gradient(160deg, #38224a, #251332);
  border-color: #9c64b1;
  box-shadow: 0 3px 10px #09020f80;
}
.chat-shell .bubble.client {
  background: linear-gradient(155deg, #55105e, #281033);
  border-color: #f0b95f;
  box-shadow: 0 0 10px #e150ce4a, inset 0 0 8px #b43cbe36;
}
.chat-shell .bubble strong { color: #e9c1ef; }
.chat-compose { background: linear-gradient(180deg, #221132, #170b23); border-top-color: #9464a6; }
.chat-compose .message-bar :is(input, textarea) {
  border-color: #b57bd2;
  box-shadow: inset 0 0 12px #a63ad33a;
}
.chat-compose button.primary {
  background: linear-gradient(145deg, #ffeaa0, #e8a03b 83%);
  color: #2b1328;
  border-color: #ffd788;
  box-shadow: 0 0 12px #f1a73d68;
}
.chat-compose button.primary:hover { background: linear-gradient(145deg, #fff4bc, #ffd06b); }
.offer-cards {
  align-self: start;
  width: min(100%, 510px);
  display: grid;
  gap: 7px;
  flex: none;
  padding: 9px;
  border-radius: 17px;
  border: 1px solid #efbd6b;
  background: #200f31e8;
  box-shadow: 0 0 17px #e975c745;
}
.offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #ad64c8;
  border-radius: 12px;
  background: linear-gradient(120deg, #40135a, #301142 70%, #581951);
  box-shadow: inset 0 0 10px #d14df637;
}
.offer strong { color: #fff6fd; }
.offer p { color: #e2bedf; margin: 3px 0 0; font-size: .875rem; }
.offer b { color: #ffdb80; font-size: clamp(1.22rem, 5vw, 2rem); overflow-wrap: anywhere; max-width: 10ch; }

.chat-page { max-width: 1050px; }
.chat-guest { max-width: 490px; }
.chat-shell {
  background: #170822;
  border-color: #d0a05b;
  box-shadow: 0 18px 50px #030106, 0 0 28px #8e34bb48;
}
.chat-shell .thread {
  background-size: 100% 100%;
  background-image: linear-gradient(180deg, #1c0b2411, #13091b09 55%, #11051b17), url("/royal-chat.jpg");
}
.chat-header {
  background: radial-gradient(ellipse at 45% 18%, #601987af, transparent 65%), linear-gradient(180deg, #1e0b2d, #11071b);
  border-bottom-color: #ba59e8;
}
.chat-avatar {
  flex-basis: 49px;
  width: 49px;
  height: 49px;
  box-shadow: 0 0 5px #fff1ab, 0 0 17px #ec55da, inset 0 0 8px #ffc84277;
}
.chat-avatar span { font-size: 1.4rem; }
.chat-day {
  align-self: center;
  padding: 3px 18px;
  border: 1px solid #75458d;
  border-radius: 999px;
  background: linear-gradient(#381346, #1f0d2c);
  color: #fff2fc;
  box-shadow: inset 0 0 11px #bd65d945;
  font-size: .875rem;
}
.chat-shell .bubble {
  border-radius: 18px 18px 18px 5px;
  background: linear-gradient(150deg, #4d2859, #27112feF);
  border-color: #b277c0;
  box-shadow: 0 4px 12px #050208b0, inset 0 0 11px #b75fcb2e;
}
.chat-shell .bubble.client {
  border-radius: 18px 18px 5px 18px;
  background: linear-gradient(145deg, #63176a, #2d1037);
  border-color: #f2c465;
  box-shadow: 0 0 10px #f658d165, inset 0 0 12px #f291521f;
}
.chat-compose { border-top-color: #d19965; }
.chat-compose .message-bar :is(input, textarea) {
  border-color: #da91d9;
  background: #261031;
  box-shadow: 0 0 13px #f058be45, inset 0 0 12px #a63ad33a;
}
.chat-compose button.primary { border-color: #ffdd73; }
.offer-cards {
  padding: 10px;
  border-color: #ffcf67;
  background: #1c0a2df0;
  box-shadow: 0 0 18px #e975c775;
}
.offer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 9px 10px;
  gap: 8px;
  border-color: #e56bda;
  background: linear-gradient(140deg, #4f1065, #301042 58%, #751e64);
  box-shadow: inset 0 0 10px #e085f264;
}
.offer-mark {
  display: grid;
  place-items: center;
  color: #ffda66;
  font-size: clamp(1.35rem, 6vw, 2.1rem);
  text-shadow: 0 0 10px #fcb6598f;
}
.offer strong { display: block; line-height: 1.17; }
.offer b {
  color: #ffda66;
  font-weight: 900;
  text-shadow: 0 2px #a75725, 0 0 11px #ffc46182;
}
@media (max-width: 700px) {
  .chat-guest { max-width: 100%; }
  .chat-guest .thread { height: clamp(240px, calc(100dvh - 160px), 760px); }
}
.chat-guest .chat-day + .bubble {
  max-width: min(78%, 340px);
  margin-top: clamp(10px, 4dvh, 34px);
}

.chat-choices {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-self: start;
  gap: 7px;
}
.chat-choices button {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 13px;
  border-color: #ba7fce;
  background: #2d143d;
  color: #fff1fc;
  font-size: .9rem;
}
.chat-choices button.primary {
  border-color: #ffdb79;
  background: linear-gradient(145deg, #ffe9a1, #e9a23c);
  color: #321b33;
}
.chat-correction {
  align-self: start;
  margin: 0;
  padding: 1px 8px;
  color: #f7d1fa;
  background: #291434e8;
  border-radius: 6px;
  font-size: .875rem;
}

.chat-shell .copy-alias {
  margin-top: 8px;
  min-height: 40px;
  border-color: #d49c5f;
  border-radius: 10px;
  background: #351a43;
  color: #ffdb8d;
  font-size: .875rem;
}

.install-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 17px;
  padding-top: 10px;
  border-top: 1px solid #63406e;
}
.install-chat {
  min-height: 44px;
  border-color: #9760a8;
  background: #281335;
  color: #ffdd93;
  font-size: .875rem;
}
.chat-shell > .install-row {
  justify-content: center;
  margin: 0;
  padding: 6px 10px;
  border: 0;
}
.install-dialog {
  width: min(380px, calc(100vw - 30px));
  padding: 20px;
  border: 1px solid #bb805c;
  border-radius: 16px;
  color: #fff0f9;
  background: #291437;
}
.install-dialog::backdrop { background: #11051bcc; }
.install-dialog ol { padding-left: 23px; }
.install-dialog li { margin-block: 8px; }
.install-shortcut-dialog { text-align: start; max-height: 85dvh; overflow: auto; }
.install-dialog-actions { display: grid; gap: 12px; padding: 4px; }
.install-dialog-actions button { width: 100%; min-height: 44px; white-space: normal; }

@media (max-width: 700px) {
  .chat-guest .thread { height: clamp(210px, calc(100dvh - 230px), 710px); }
}

.chat-header-ganamos { padding-block: 8px 11px; }
.chat-header-ganamos .chat-identity { margin-left: 0; }
.chat-header .chat-wordmark {
  position: relative;
  width: min(205px, 100%);
  aspect-ratio: 2.57;
  margin: 0 0 2px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 88%, #551575, #180921 68%);
  mask-image: radial-gradient(ellipse 67% 83% at center, #000 59%, transparent 100%);
}
.chat-wordmark img {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateY(-51.6%);
  filter: contrast(1.32);
  mix-blend-mode: screen;
}
.chat-wordmark a { position: absolute; inset: 0; }
.chat-wordmark a:focus-visible { outline-offset: -3px; }
.chat-header-ganamos .chat-identity > p { margin-left: 4px; }
@media (max-width: 700px) {
  .chat-header .chat-wordmark { width: min(180px, 100%); }
}

@media (max-width: 700px) {
  .chat-guest:has(.chat-header-ganamos) .thread { height: clamp(210px, calc(100dvh - 264px), 710px); }
}

.message-bar-with-file { grid-template-columns: auto minmax(0, 1fr) auto; }
:is(.chat-compose, #admin-thread) .attach-file {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #bd7cbf;
  border-radius: 50%;
  background: #30173c;
  color: #ffd884;
  font-size: 1.4rem;
  line-height: 1;
}
.attach-file:focus-within { outline: 2px solid #ff99dc; outline-offset: 2px; }
:is(.chat-compose, #admin-thread) .attach-file input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.attachment-name {
  padding: 4px 4px 0 54px;
  margin: 0;
  color: #f1c5e8;
  font-size: .875rem;
}

.chat-shell .bubble.staff { border-color: #9885bb; background: #302747; }
.chat-shell .bubble.staff strong { color: #ddd1ff; }
.withdrawal-payment > summary,
.withdrawal-payment button.primary {
  width: fit-content;
  padding: 9px 14px;
  border: 1px solid #59c88e;
  border-radius: 10px;
  background: #1b663f;
  color: #f0fff4;
}

/* Ganamos conversation */
.chat-page .chat-shell {
  border-color: #6c527f;
  background: #1b1227;
  box-shadow: 0 16px 42px #08040f70;
}
.chat-page .chat-shell .thread {
  background: linear-gradient(180deg, #1b0c282e, #1b0c2866 46%, #1b0c281f),
    url("/royal-chat.jpg") center 65% / cover no-repeat #1b0c28;
}
.chat-page .chat-shell .bubble {
  border: 1px solid #7f6392;
  border-radius: 16px 16px 16px 5px;
  background: #38274a;
  box-shadow: none;
  color: #fff8ff;
}
.chat-page .chat-shell .bubble.client {
  border-color: #e1b76c;
  border-radius: 16px 16px 5px 16px;
  background: #825533;
  color: #fffaf0;
}
.chat-page .chat-shell .bubble.staff { background: #293749; border-color: #8ca8c7; }
.chat-page .chat-compose { background: #21162d; border-color: #6c527f; }
.chat-tools { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 8px; }
.chat-tools .operator-button { background: #322440; border-color: #927aa6; color: #fff0d1; }
.operator-confirmation { margin: 6px 0; color: #fff0d1; font-size: .875rem; }

.attachment-controls { display: flex; gap: 4px; }
.attachment-controls svg { width: 20px; height: 20px; pointer-events: none; }
.chat-compose .attachment-controls .attach-file { width: 38px; height: 44px; }
.admin-inbox {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(280px, 2fr) minmax(190px, 1.1fr) minmax(150px, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-inbox > .card { min-width: 0; overflow-wrap: anywhere; }
.admin-inbox .item { text-align: left; }
.admin-inbox .thread { max-height: 54dvh; }
.admin-live-chat .chat-shell { max-width: none; }
.admin-live-chat .chat-shell > p, .admin-live-chat .chat-shell > form { padding-inline: 12px; }
.admin-live-chat .chat-shell > button { margin: 0 12px 12px; }
#ready-charge-alert:not([hidden]) {
  background: #62f59a;
  color: #092318;
  padding: 12px;
  border-radius: 9px;
  font-weight: 700;
}
#admin-cargas-listas {
  background: #0e231b;
  border: 2px solid #4ade80;
}
#admin-cargas-listas > h2 {
  background: #62f59a;
  color: #092318;
  padding: 8px 10px;
  border-radius: 9px;
}
.ready-charge {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #17372a;
  border: 1px solid #409e6b;
  border-inline-start: 4px solid #62f59a;
  border-radius: 10px;
}
.ready-charge > strong { color: #b3ffd0; }
.ready-charge-total { font-size: 1.2rem; line-height: 1.2; }
.ready-charge button.ready-charge-take {
  background: #62f59a;
  border-color: #62f59a;
  color: #092318;
}
.ready-charge-assigned { background: #172820; border-color: #527466; }
@media (max-width: 1000px) {
  .admin-inbox { grid-template-columns: minmax(0, 1fr); }
  .admin-live-chat { grid-row: 1; }
  #admin-cargas-listas { grid-row: 2; }
}

.admin-sections { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.admin-sections a { padding: 8px 12px; color: inherit; border: 1px solid #826995; border-radius: 9px; }
#admin-billeteras, #admin-plataformas, #admin-limites { scroll-margin-top: 16px; }

html:has(main.chat-page), body:has(main.chat-page) {
  overflow: hidden;
  overscroll-behavior: none;
}
main.chat-page {
  position: fixed;
  inset-inline: 0;
  top: var(--chat-viewport-top, 0px);
  margin: 0 auto;
  width: min(780px, 100%);
  height: var(--chat-viewport, 100dvh);
  padding: 12px 16px;
}
.chat-page .chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: none;
}
.chat-page .chat-shell > :not(.thread) { flex: 0 0 auto; }
.chat-page .chat-shell > .thread {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}
.chat-page .chat-shell > .thread > * { flex-shrink: 0; }
.chat-header:has(.chat-account) {
  position: relative;
  z-index: 1;
  gap: 5px;
}
.chat-header .chat-account { flex: none; }
.chat-header .chat-account-name {
  min-width: 0;
  max-width: clamp(78px, 25vw, 128px);
  padding: 4px 6px;
  font-size: .78rem;
}
.chat-header .chat-account-name strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-account summary {
  display: grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
  color: #f5db9f;
  font-size: 1.4rem;
}
.chat-account summary::-webkit-details-marker { display: none; }
.chat-account-popover {
  position: absolute;
  top: 100%;
  right: 12px;
  padding: 6px;
  background: #291b38;
  border: 1px solid #9579a8;
  border-radius: 12px;
}
.chat-account-popover button { font-size: .875rem; }
.chat-page .chat-compose {
  padding: 8px clamp(8px, 2vw, 18px) max(6px, env(safe-area-inset-bottom));
}
.chat-page .chat-tools {
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.chat-page .chat-tools .install-row { margin: 0; padding: 0; border: 0; }
.chat-page .chat-tools :is(.operator-button, .install-chat) {
  min-height: 34px;
  padding: 4px 9px;
  font-size: .8rem;
}
.chat-page .chat-tools .operator-confirmation { margin: 0; }
.chat-tools .operator-button svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 700px) {
  main.chat-page { padding: 0; }
  .chat-page .chat-shell { border-radius: 0; border-block: 0; }
  .chat-page .chat-header { padding: max(3px, env(safe-area-inset-top)) 10px 3px; }
  .chat-page .chat-header .chat-wordmark { width: min(152px, 100%); }
  .chat-page .message-bar { gap: 5px; }
  .chat-page .message-bar > button { padding-inline: 9px; }
}

.staff-thread-heading, .staff-composer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.staff-thread-heading { justify-content: space-between; padding-inline: 12px; }
.staff-thread-heading p { margin: 0; }
.staff-round, .staff-thread-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}
.staff-thread-close { width: 32px; height: 32px; }
.staff-composer-line { display: flex; align-items: center; gap: 8px; }
.staff-composer-line textarea { flex: 1; min-width: 0; }
#staff-help-alert:not([hidden]) {
  margin-bottom: 12px;
  padding: 12px;
  background: #45264c;
  color: #fff2ff;
  border: 2px solid #f7a6ed;
  border-radius: 10px;
}
.staff-help-request { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.staff-help-request p { margin: 6px 0; }
.staff-composer-actions { flex-wrap: wrap; }

.chat-page button.install-chat {
  background: linear-gradient(110deg, #ffe391, #ffb944);
  color: #2d1535;
  border: 1px solid #fff1b0;
  border-radius: 999px;
  padding-inline: 14px;
  font-weight: 750;
  box-shadow: 0 0 9px #ffbe5555;
}
@media (prefers-reduced-motion: no-preference) {
  .chat-page button.install-chat { animation: install-glow 1.7s ease-in-out 3; }
}
@keyframes install-glow {
  50% { box-shadow: 0 0 17px #ffc558cc; }
}

.install-promo {
  flex: 1 1 220px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #b4795c;
  border-radius: 12px;
  background: linear-gradient(110deg, #40204d, #281335);
  box-shadow: inset 0 0 12px #ffbc4426;
  text-align: center;
}
.install-promo-copy strong { color: #ffe391; }
.install-promo-copy p { margin: 2px 0 0; color: #fff2fa; font-size: .8rem; }
.chat-shell > .install-promo {
  position: relative;
  padding: 6px 9px;
  flex: 0 0 auto;
  margin: 2px 8px;
  border: 1px solid #ffcb70;
  box-shadow: inset 0 0 18px #ffbc4438, 0 0 10px #ffbb4433;
}
.install-promo-copy strong {
  display: block;
  font: italic 900 clamp(1.1rem, 4.2vw, 1.55rem)/1.08 "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  letter-spacing: -.02em;
  color: #ffe297;
  text-shadow: 0 0 12px #ffbf5555;
}
.install-promo-copy p { font-size: clamp(.82rem, 3.35vw, 1rem); font-weight: 750; margin-top: 3px; }
.install-promo-lights { position: absolute; inset: 0; pointer-events: none; }
.install-promo-lights i {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 6px;
  background: #fff8cd;
  border-radius: 50%;
  box-shadow: 0 0 9px 3px #ffc957, 0 0 17px 3px #ffb43d99;
  offset-path: inset(3px round 10px);
  offset-rotate: 0deg;
  offset-distance: var(--light-start, 0%);
}
@supports (offset-path: inset(3px round 10px)) {
  @media (prefers-reduced-motion: no-preference) {
    .install-promo-lights i { animation: promo-lap 4s linear var(--light-delay, 0ms) infinite; }
  }
}
@keyframes promo-lap { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.chat-page .customer-tools { justify-content: flex-start; }

.daily-promo {
  display: flex;
  justify-content: center;
  padding: 4px 10px 8px;
}

.daily-promo .install-dialog {
  max-height: 85dvh;
  overflow: auto;
}

.offer-image {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  max-height: 55dvh;
  object-fit: contain;
  border-radius: 10px;
}

.daily-promo-request {
  grid-column: 1 / -1;
  background: linear-gradient(110deg, #ffe391, #ffb944);
  color: #2d1535;
  border: 1px solid #fff1b0;
  font-weight: 750;
}

.chat-page .daily-promo {
  padding-block: 5px 8px;
}

.chat-page button.daily-promo-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 285px);
  min-height: 46px;
  padding: 8px 20px;
  border: 1px solid #ffe18a;
  border-radius: 999px;
  background: linear-gradient(105deg, #201033, #492060 50%, #201033);
  color: #ffeab0;
  box-shadow: 0 0 10px #eebd5948;
  font: 700 clamp(1.05rem, 5vw, 1.34rem)/1.15 Georgia, serif;
  text-align: center;
}

.daily-promo-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 50%;
  width: 235px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-11deg);
  border: 3px double #eec464;
  border-radius: 50%;
  opacity: .4;
  background:
    radial-gradient(circle, #21102b 0 37%, #e1a34b 38% 39%, transparent 40%),
    repeating-conic-gradient(#652336 0deg 8deg, #b18143 8deg 9deg, #1c1630 9deg 17deg, #b18143 17deg 18deg);
}

.chat-header-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}

.chat-header-ganamos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: clamp(3px, 1.2vw, 10px);
}

.chat-header .chat-header-account .chat-account-name { max-width: 100%; }

.casino-clock {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 2px 9px 3px;
  border: 1px solid #ba8e5d;
  border-radius: 14px;
  background: radial-gradient(ellipse at top, #572d62, #211029 75%);
  box-shadow: inset 0 0 7px #ffd78033;
}

.casino-clock-face {
  position: relative;
  display: block;
  width: clamp(31px, 8vw, 41px);
  aspect-ratio: 1;
  border: 1px solid #ffe1a2;
  border-radius: 50%;
  background:
    radial-gradient(circle, #2b1836 0 56%, transparent 57%),
    repeating-conic-gradient(from -2deg, #e7c17d 0deg 4deg, #55315f 4deg 30deg);
}

.casino-clock-dice, .casino-clock-suit {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe0a2;
  font: 10px/1 Georgia, serif;
}

.casino-clock-dice { top: 3px; }
.casino-clock-suit { bottom: 3px; font-size: 8px; }

.casino-clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  transform-origin: center bottom;
  background: #ffe1a2;
}

.casino-clock-hand.hour {
  height: 23%;
  transform: translateX(-50%) rotate(var(--hour-angle, 0deg));
}

.casino-clock-hand.minute {
  height: 35%;
  background: #fff8d6;
  transform: translateX(-50%) rotate(var(--minute-angle, 0deg));
}

.casino-clock-digits {
  color: #fff1bd;
  font: 750 .91rem/1 ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.chat-page .bonus-subscription-trigger {
  width: min(100%, 335px);
  min-height: 52px;
  padding: 10px 18px;
  border: 1px solid #fff0b5;
  border-radius: 999px;
  color: #301637;
  background: linear-gradient(115deg, #fff1b4, #ffc34e);
  box-shadow: 0 0 12px #ffc55b65, inset 0 1px 0 #fff9dc;
  font-size: clamp(.98rem, 4.2vw, 1.16rem);
  font-weight: 850;
  line-height: 1.15;
}

.promo-preview-page .top { display: none; }

.promo-preview-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 440px);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 12px 15px;
}

.promo-preview-panel h2 { margin: 0; text-align: center; }
.promo-preview-panel .offer-cards { width: 100%; }
.promo-preview-panel .offer-image { max-height: min(56dvh, calc(100dvh - 250px)); }
.promo-preview-actions { display: grid; gap: 7px; }
.promo-preview-actions .daily-promo-request { width: 100%; }
.promo-preview-panel button { min-height: 44px; }
.promo-preview-close { width: 100%; }


.message-reaction {
  align-self: end;
  display: table;
  margin: 3px 0 0 auto;
  padding: 1px 6px;
  border: 1px solid #ffcd926e;
  border-radius: 999px;
  background: #2c193b;
  font-size: .9rem;
  line-height: 1.3;
}

#pending-payment-alert:not([hidden]) {
  padding: 9px 12px;
  border: 1px solid #cf9f56;
  border-radius: 9px;
  color: #ffe6aa;
  background: #503411;
}
