/* Hadal 1.9: support chat, the admin inbox, and the Support buttons in Settings. Uses the colours in styles.css. */

/* ---------- Settings: the Support buttons */
#settingsBtn { position: relative; }
.sup-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font: 800 11px/1 var(--body); color: #fff; background: linear-gradient(180deg, #ff6b9d, #ef4e6a); box-shadow: 0 0 0 2px var(--bg0), 0 0 14px rgba(239, 78, 106, 0.7); animation: dot-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
@keyframes dot-in { from { transform: scale(0); } }
.sup-cta-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.sup-cta-row.two { grid-template-columns: 1fr 1fr; }
.sup-btn { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 0; color: #fff; text-align: left; isolation: isolate;
  background: linear-gradient(120deg, #4f7cf0 0%, #7b6cff 45%, #e0569b 100%); background-size: 160% 160%; animation: sup-flow 7s ease-in-out infinite;
  box-shadow: 0 10px 30px -10px rgba(123, 108, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: transform 0.15s, box-shadow 0.2s, filter 0.2s; }
.sup-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 48%, transparent 64%); transform: translateX(-120%); animation: sup-sheen 3.6s ease-in-out infinite; }
.sup-btn:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 16px 38px -12px rgba(123, 108, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.sup-btn:active { transform: translateY(1px); }
.sup-btn.admin { background: linear-gradient(120deg, #c98a1f 0%, #e8b04b 50%, #f3c768 100%); background-size: 160% 160%; color: #1a1205; box-shadow: 0 10px 30px -10px rgba(232, 176, 75, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.sup-btn-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
.sup-btn.admin .sup-btn-ic { background: rgba(26, 18, 5, 0.12); box-shadow: inset 0 0 0 1px rgba(26, 18, 5, 0.15); }
.sup-btn-txt { display: grid; gap: 1px; flex: 1; min-width: 0; }
.sup-btn-txt b { font: 700 15px var(--display); letter-spacing: -0.02em; }
.sup-btn-txt small { font-size: 12.5px; opacity: 0.86; font-weight: 600; }
.sup-btn-badge { font-style: normal; padding: 3px 9px; border-radius: 999px; background: #fff; color: #c2185b; font: 800 11.5px var(--body); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); animation: dot-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.sup-btn.admin .sup-btn-badge { background: #1a1205; color: #f3c768; }
.sup-cta-row.two .sup-btn { padding: 13px 14px; }
.sup-cta-row.two .sup-btn-txt b { font-size: 14px; line-height: 1.25; }
.sup-cta-row.two .sup-btn-badge { position: absolute; top: 8px; right: 8px; }
@keyframes sup-flow { 50% { background-position: 100% 50%; } }
@keyframes sup-sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* ---------- the support window */
dialog.sup-dlg { width: min(640px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px)); max-height: none; overflow: hidden; background: linear-gradient(180deg, #0f1528 0%, #0b1020 100%); }
.sup { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.sup-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex: none; }
.sup-titles { flex: 1; min-width: 0; }
.sup-titles h2 { margin: 0; font: 700 19px var(--display); letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-titles p { color: var(--mute); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--mute); font-size: 20px; line-height: 1; transition: color 0.15s, border-color 0.15s; }
.sup-icon:hover { color: var(--text); border-color: var(--line-strong); }
.sup-icon.float { position: absolute; top: 16px; right: 16px; }
.sup-head-right { display: flex; align-items: center; gap: 8px; }
.sup-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 22px; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.3) transparent; }
.sup-h3 { font: 600 13px var(--body); color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 10px; }
.sup-chip-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); }
.sup-chip-ic.sm { width: 32px; height: 32px; border-radius: 9px; }
.sup-chip-ic.sm svg { width: 18px; height: 18px; }
.sup-chip-ic.xs { width: 22px; height: 22px; border-radius: 7px; }
.sup-chip-ic.xs svg { width: 13px; height: 13px; }

.sup-presence { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #c7d0e6; background: var(--raise); border: 1px solid var(--line); }
.sup-presence i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.sup-presence.on { color: #c9f5e0; border-color: color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
.sup-presence.on i { background: var(--green); box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.6); animation: blip 1.6s ease-out infinite; }
.sup-presence.inline { padding: 5px 10px; font-size: 12.5px; }

/* reasons */
.sup-reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sup-reason { position: relative; display: grid; align-content: start; gap: 6px; padding: 14px 13px 13px; border-radius: 14px; text-align: left; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); color: var(--text); overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2), border-color 0.18s, box-shadow 0.18s, background 0.18s; animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; animation-delay: calc(var(--i) * 28ms); }
.sup-reason::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120px 80px at 20% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); opacity: 0; transition: opacity 0.2s; }
.sup-reason:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--c) 80%, transparent); }
.sup-reason:hover::before { opacity: 1; }
.sup-reason > * { position: relative; }
.sup-reason-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); margin-bottom: 2px; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
.sup-reason:hover .sup-reason-ic { transform: scale(1.1) rotate(-6deg); }
.sup-reason b { font: 700 14px var(--display); letter-spacing: -0.02em; line-height: 1.2; }
.sup-reason small { color: var(--mute); font-size: 12.5px; line-height: 1.35; }
.sup-foot { margin-top: 18px; color: var(--mute); font-size: 13px; }

/* your chats */
.sup-rows { display: grid; gap: 8px; }
.sup-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); text-align: left; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.sup-row:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.sup-row.unread { border-color: color-mix(in srgb, #e0569b 55%, transparent); box-shadow: 0 0 24px -14px #e0569b; }
.sup-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sup-row-top { display: flex; justify-content: space-between; gap: 8px; }
.sup-row-top b { font-size: 14px; }
.sup-row-top em { font-style: normal; color: var(--dim); font-size: 12px; flex: none; }
.sup-row-last { color: var(--mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-pill { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--mute); border: 1px solid var(--line); white-space: nowrap; }
.sup-pill.open { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.sup-pill.new { color: #fff; border: 0; background: linear-gradient(180deg, #ff6b9d, #e0569b); }
.sup-pill.good { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }
.sup-pill.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); }

/* compose */
.sup-tip { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; color: #d6deef; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); margin-bottom: 6px; animation: rise 0.3s both; }
.sup-tip b { color: var(--c); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.sup-compose { display: grid; gap: 8px; padding: 0; }
.sup-label { font-weight: 700; font-size: 14px; margin-top: 10px; }
.sup-label span { color: var(--dim); font-weight: 500; }
.sup-ta-wrap { position: relative; }
.sup-ta { width: 100%; resize: vertical; min-height: 130px; padding: 12px 14px 26px; border-radius: 12px; border: 1px solid var(--line); background: #070a13; color: var(--text); font: 15px/1.5 var(--body); outline: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.sup-ta.sm { min-height: 80px; padding-bottom: 12px; }
.sup-ta:focus, .sup-email:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93, 139, 255, 0.18); }
.sup-count { position: absolute; right: 12px; bottom: 9px; font-size: 11.5px; color: var(--dim); pointer-events: none; }
.sup-email { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: #070a13; color: var(--text); font: 15px var(--body); outline: 0; }
.sup-attach { color: var(--mute); font-size: 12.5px; padding-left: 20px; position: relative; }
.sup-attach::before { content: ''; position: absolute; left: 2px; top: 4px; width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--accent); }
.sup-err { min-height: 18px; color: var(--red); font-size: 13.5px; font-weight: 600; }
.sup-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.sup-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 11px; border: 0; color: #fff; font: 700 14.5px var(--body);
  background: linear-gradient(120deg, #4f7cf0, #7b6cff 55%, #e0569b); background-size: 150% 150%; box-shadow: 0 10px 26px -10px rgba(123, 108, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: transform 0.12s, filter 0.2s, opacity 0.2s; }
.sup-cta:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.sup-cta:disabled { opacity: 0.5; cursor: not-allowed; }
.sup-cta.busy { cursor: progress; opacity: 0.75; }
.sup-cta.busy span:first-child { animation: sup-fly 0.9s ease-in-out infinite; }
@keyframes sup-fly { 50% { transform: translate(3px, -3px) rotate(-12deg); } }

/* sent */
.sup-sent { position: relative; flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 30px 28px; text-align: center; background: radial-gradient(420px 300px at 50% 32%, rgba(123, 108, 255, 0.16), transparent 70%); }
.sup-sent h2 { font: 700 26px var(--display); letter-spacing: -0.03em; margin-top: 8px; animation: rise 0.4s 0.35s both; }
.sup-big { font-size: 17px; font-weight: 600; color: #dfe6f6; max-width: 34ch; animation: rise 0.4s 0.45s both; }
.sup-small { color: var(--mute); font-size: 13.5px; max-width: 44ch; animation: rise 0.4s 0.55s both; }
.sup-sent-acts { display: flex; gap: 10px; margin-top: 14px; animation: rise 0.4s 0.65s both; }
.sup-burst { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.sup-burst.sm { width: 104px; height: 104px; }
.sup-burst.sm .sup-check svg { width: 48px; height: 48px; }
.sup-check { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(62, 207, 142, 0.22), rgba(62, 207, 142, 0.04) 70%); animation: sup-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.sup-burst.sm .sup-check { width: 64px; height: 64px; }
.ck-ring { stroke: var(--green); stroke-dasharray: 145; stroke-dashoffset: 145; animation: ck-draw 0.6s 0.1s ease-out forwards; }
.ck-tick { stroke: var(--green); stroke-dasharray: 40; stroke-dashoffset: 40; animation: ck-draw 0.35s 0.55s ease-out forwards; }
@keyframes ck-draw { to { stroke-dashoffset: 0; } }
@keyframes sup-pop { from { transform: scale(0.3); opacity: 0; } }
.sup-stk { position: absolute; left: 50%; top: 50%; font-size: 26px; line-height: 1; margin: -13px 0 0 -13px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  animation: stk-out 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.3) both, stk-float 3.2s ease-in-out infinite; animation-delay: calc(0.35s + var(--i) * 70ms), calc(1.2s + var(--i) * 160ms); }
.sup-burst.sm .sup-stk { font-size: 19px; margin: -10px 0 0 -10px; }
@keyframes stk-out { from { transform: rotate(var(--a)) translateY(0) rotate(calc(-1 * var(--a))) scale(0); opacity: 0; } to { transform: rotate(var(--a)) translateY(-66px) rotate(calc(-1 * var(--a))) scale(1); opacity: 1; } }
@keyframes stk-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.sup-burst .sup-stk { transform: rotate(var(--a)) translateY(-66px) rotate(calc(-1 * var(--a))); }
.sup-burst.sm .sup-stk { animation-name: stk-out-sm, stk-float; transform: rotate(var(--a)) translateY(-46px) rotate(calc(-1 * var(--a))); }
@keyframes stk-out-sm { from { transform: rotate(var(--a)) translateY(0) rotate(calc(-1 * var(--a))) scale(0); opacity: 0; } to { transform: rotate(var(--a)) translateY(-46px) rotate(calc(-1 * var(--a))) scale(1); opacity: 1; } }

/* chat */
.sup-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sup-chat-top { display: flex; justify-content: center; padding: 10px 16px 0; flex: none; }
.sup-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 8px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.3) transparent; overscroll-behavior: contain; }
.sup-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 84%; margin-top: 8px; }
.sup-msg.grouped { margin-top: 0; }
.sup-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.sup-msg.fresh { animation: msg-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.sup-msg.mine.fresh { transform-origin: 100% 100%; }
.sup-msg.theirs.fresh { transform-origin: 0 100%; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.94); } }
.sup-col { display: grid; gap: 2px; min-width: 0; }
.sup-msg.mine .sup-col { justify-items: end; }
.sup-name { font-size: 11.5px; font-weight: 700; color: var(--mute); padding-left: 4px; }
.sup-bub { padding: 9px 13px; border-radius: 17px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-msg.mine .sup-bub { color: #fff; background: linear-gradient(160deg, #6d97ff, #4f7cf0 60%, #5a6df0); border-bottom-right-radius: 6px; box-shadow: 0 6px 18px -10px rgba(79, 124, 240, 0.9); }
.sup-msg.theirs .sup-bub { background: #161e34; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.sup-msg.grouped.mine .sup-bub { border-top-right-radius: 8px; }
.sup-msg.grouped.theirs .sup-bub { border-top-left-radius: 8px; }
.sup-bub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sup-msg.theirs .sup-bub a { color: var(--accent-2); }
.sup-time { font-size: 11px; color: var(--dim); padding: 0 6px; }
.sup-msg.grouped .sup-time { display: none; }
.sup-msg:hover .sup-time { display: block; }
.sup-msg.sending { opacity: 0.6; }
.sup-msg.sending .sup-time { display: block; }
.sup-msg.failed { opacity: 1; cursor: pointer; }
.sup-msg.failed .sup-bub { background: color-mix(in srgb, var(--red) 25%, #161e34); box-shadow: none; }
.sup-msg.failed .sup-time { color: var(--red); display: block; }
.sup-av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 800 12px var(--body); color: #fff; background: linear-gradient(160deg, #5f6b88, #3b4560); }
.sup-av.team { background: radial-gradient(circle at 30% 30%, #1d2850, #0b1022); box-shadow: inset 0 0 0 1px rgba(127, 164, 255, 0.4); }
.sup-av.ghost { visibility: hidden; }
.sup-sys { align-self: center; margin: 10px 0 4px; max-width: 92%; text-align: center; }
.sup-sys span { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; color: var(--mute); background: var(--raise); border: 1px solid var(--line); }
.sup-sys.fb span { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.sup-receipt { align-self: flex-end; font-size: 11px; color: var(--dim); padding: 1px 6px 0; animation: rise 0.25s both; }
.sup-receipt.seen { color: var(--accent-2); }
.sup-receipt.seen::before { content: '✓✓ '; letter-spacing: -2px; margin-right: 3px; }
.sup-typing { display: flex; align-items: center; gap: 8px; padding: 2px 22px 8px; color: var(--mute); font-size: 12.5px; flex: none; animation: rise 0.2s both; }
.sup-dots { display: inline-flex; gap: 3px; padding: 7px 9px; border-radius: 12px; background: #161e34; border: 1px solid var(--line); }
.sup-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--mute); animation: dots 1.1s ease-in-out infinite; }
.sup-dots i:nth-child(2) { animation-delay: 0.15s; }
.sup-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.sup-foot-area { flex: none; padding: 10px 16px 14px; border-top: 1px solid var(--line); background: rgba(7, 10, 19, 0.6); }
.sup-composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; border: 1px solid var(--line-strong); background: #0a0f1d; transition: border-color 0.15s, box-shadow 0.15s; }
.sup-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93, 139, 255, 0.16); }
.sup-input { flex: 1; min-height: 24px; max-height: 140px; padding: 7px 0; border: 0; outline: 0; resize: none; background: none; color: var(--text); font: 15px/1.45 var(--body); }
.sup-fire { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(140deg, #6d97ff, #7b6cff 60%, #e0569b); transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.5), opacity 0.2s, filter 0.2s; }
.sup-fire:hover:not(:disabled) { transform: scale(1.06) rotate(-6deg); filter: brightness(1.1); }
.sup-fire:disabled { opacity: 0.35; cursor: default; }
.sup-safe { margin-top: 7px; text-align: center; font-size: 11.5px; color: var(--dim); }
.sup-end { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: none; color: var(--mute); font: 700 12.5px var(--body); transition: color 0.15s, border-color 0.15s, background 0.15s; white-space: nowrap; }
.sup-end:hover { color: var(--text); border-color: var(--text); }
.sup-end.confirm { color: #fff; border-color: var(--red); background: var(--red); animation: hg-shake-soft 0.3s; }
@keyframes hg-shake-soft { 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }

/* live pill */
.sup-conn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.sup-conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.sup-conn[data-state='live'] { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.sup-conn[data-state='live'] i { background: var(--green); animation: blip 1.6s ease-out infinite; }
.sup-conn[data-state='wait'] i { animation: pulse 0.9s ease-in-out infinite; }
.sup-conn[data-state='off'] { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.sup-conn[data-state='off'] i { background: var(--red); }

/* ended + feedback */
.sup-fb, .sup-ended, .sup-thanks { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 8px 4px 2px; animation: rise 0.35s both; }
.sup-fb-by { color: var(--mute); font-size: 12.5px; }
.sup-fb h3 { font: 700 18px var(--display); letter-spacing: -0.03em; }
.fb-yns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fb-yn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raise); color: var(--text); font-weight: 700; transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.5), border-color 0.15s, background 0.15s; }
.fb-yn span { font-size: 18px; transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.8); }
.fb-yn:hover { transform: translateY(-2px); }
.fb-yn[aria-pressed='true'] { border-color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.fb-yn.no[aria-pressed='true'] { border-color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.fb-yn[aria-pressed='true'] span { transform: scale(1.3) rotate(-10deg); }
.sup-fb-q { color: var(--mute); font-size: 13px; margin-top: 4px; }
.fb-stars { display: flex; gap: 4px; }
.fb-star { padding: 2px; border: 0; background: none; line-height: 0; transition: transform 0.15s cubic-bezier(0.2, 0.9, 0.3, 1.8); }
.fb-star svg path { fill: rgba(141, 154, 184, 0.18); stroke: rgba(141, 154, 184, 0.5); stroke-width: 1.3; stroke-linejoin: round; transition: fill 0.15s, stroke 0.15s; }
.fb-star.on svg path { fill: #f3c768; stroke: #e8b04b; filter: drop-shadow(0 0 6px rgba(243, 199, 104, 0.6)); }
.fb-star:hover { transform: scale(1.18) rotate(-6deg); }
.sup-fb .sup-ta { max-width: 460px; }
.sup-fb .sup-actions { justify-content: center; }
.sup-ended b, .sup-thanks b { font: 700 16px var(--display); letter-spacing: -0.02em; }
.sup-ended p, .sup-thanks p { color: var(--mute); font-size: 13.5px; }
.sup-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; display: inline-block; }

/* ---------- admin inbox */
dialog.ib-dlg { width: min(1200px, calc(100vw - 32px)); height: min(840px, calc(100vh - 32px)); max-height: none; overflow: hidden; background: linear-gradient(180deg, #0f1528, #0a0f1e); }
.ib { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.ib-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex: none; }
.ib-title { display: flex; align-items: center; gap: 10px; margin-right: 6px; }
.ib-title-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #1a1205; background: linear-gradient(160deg, #f3c768, #e0a43a); }
.ib-title-ic svg { width: 19px; height: 19px; }
.ib-title h2 { margin: 0; font: 700 18px var(--display); letter-spacing: -0.03em; }
.ib-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: #070a13; border: 1px solid var(--line); margin-right: auto; }
.ib-tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px; border: 0; background: none; color: var(--mute); font-weight: 700; font-size: 13.5px; transition: background 0.15s, color 0.15s; }
.ib-tab[aria-selected='true'] { color: var(--text); background: #18213a; box-shadow: inset 0 0 0 1px var(--line-strong); }
.ib-count { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ff6b9d, #e0569b); animation: dot-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.ib-chats { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.ib-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.ib-seg { display: flex; gap: 4px; padding: 12px 12px 8px; flex: none; }
.ib-seg button { flex: 1; padding: 7px 0; border-radius: 9px; border: 1px solid var(--line); background: none; color: var(--mute); font-weight: 700; font-size: 13px; }
.ib-seg button[aria-pressed='true'] { color: var(--text); border-color: var(--accent); background: rgba(93, 139, 255, 0.1); }
.ib-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 12px; display: grid; align-content: start; gap: 6px; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.3) transparent; }
.ib-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--text); text-align: left; transition: background 0.15s, border-color 0.15s; animation: rise 0.25s both; }
.ib-row:hover { background: var(--raise); }
.ib-row.sel { background: rgba(93, 139, 255, 0.1); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ib-row.unread .ib-row-top b { color: #fff; }
.ib-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ib-row-top { display: flex; justify-content: space-between; gap: 6px; }
.ib-row-top b { font-size: 13.5px; color: #d6deef; }
.ib-row-top em { font-style: normal; font-size: 11.5px; color: var(--dim); flex: none; }
.ib-row-last { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-row.unread .ib-row-last { color: #dfe6f6; font-weight: 600; }
.ib-row-last.typing { display: flex; align-items: center; gap: 6px; color: var(--accent-2); font-style: italic; }
.ib-row-last.typing .sup-dots { padding: 4px 6px; }
.ib-row-last.typing .sup-dots i { width: 4px; height: 4px; background: var(--accent-2); }
.ib-row-meta { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-row-side { display: grid; justify-items: end; gap: 5px; flex: none; }
.ib-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ff6b9d, #e0569b); box-shadow: 0 0 12px rgba(224, 86, 155, 0.6); }
.ib-stars { color: #f3c768; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ib-stars.big { font-size: 16px; letter-spacing: 1px; }
.ib-stars.none { color: var(--dim); font-size: 12.5px; letter-spacing: 0; }
.ib-none { padding: 30px 14px; text-align: center; color: var(--mute); font-size: 13.5px; }
.ib-conv { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ib-conv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; flex: none; }
.ib-conv-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ib-conv-title div { display: grid; min-width: 0; }
.ib-conv-title b { font: 700 16px var(--display); letter-spacing: -0.02em; }
.ib-conv-title span { color: var(--mute); font-size: 12.5px; }
.ib-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.ib-info { display: grid; gap: 5px; margin: 0 18px 4px; padding: 10px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); font-size: 13px; flex: none; }
.ib-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ib-line > span:first-child { width: 78px; flex: none; color: var(--dim); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.ib-line em { font-style: normal; color: var(--mute); }
.ib-line a { color: var(--accent-2); }
.ib-copy, .ib-link { padding: 2px 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: none; color: var(--mute); font-size: 12px; font-weight: 700; }
.ib-copy:hover, .ib-link:hover { color: var(--text); border-color: var(--text); }
.ib-orders { display: flex; gap: 6px; flex-wrap: wrap; }
.ib-order { font-style: normal; padding: 2px 8px; border-radius: 7px; background: rgba(62, 207, 142, 0.1); color: #b9f0d6; font-size: 12px; font-weight: 600; }
.sup-foot-area.admin { display: grid; gap: 8px; }
.ib-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ib-quick button { flex: none; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); color: #c7d0e6; font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
.ib-quick button:hover { border-color: var(--accent); color: #fff; }
.ib-closed { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 6px; color: var(--mute); font-size: 13.5px; }
.ib-closed b { color: var(--text); }
.ib-fb-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ib-fb-inline q { color: #dfe6f6; font-style: italic; }
.ib-empty { margin: auto; display: grid; justify-items: center; gap: 8px; max-width: 340px; padding: 30px; text-align: center; color: var(--mute); font-size: 13.5px; }
.ib-empty b { color: var(--text); font: 700 16px var(--display); }
.ib-empty-ic { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: var(--accent); background: rgba(93, 139, 255, 0.1); }
.ib-fb { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: grid; align-content: start; gap: 16px; scrollbar-width: thin; }
.ib-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ib-stat { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); animation: rise 0.3s both; }
.ib-stat b { font: 700 24px var(--display); letter-spacing: -0.03em; }
.ib-stat span { color: var(--mute); font-size: 12.5px; }
.ib-fb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ib-fb-card { display: grid; gap: 10px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); animation: rise 0.3s both; animation-delay: calc(var(--i) * 30ms); }
.ib-fb-card.new { border-color: color-mix(in srgb, #e0569b 50%, transparent); box-shadow: 0 0 30px -18px #e0569b; }
.ib-fb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ib-fb-top em { font-style: normal; margin-left: auto; color: var(--dim); font-size: 12px; }
.ib-fb-text { color: #dfe6f6; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ib-fb-text.none { color: var(--dim); font-style: italic; }
.ib-fb-foot { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 12.5px; min-width: 0; }
.ib-fb-foot > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  .sup-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sup-cta-row.two { grid-template-columns: 1fr; }
  .ib-chats { grid-template-columns: 1fr; }
  .ib-side { max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .ib-stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sup-btn, .sup-btn::after { animation: none; }
}

/* ---------- 1.9.1: accounts. The sign-in screen, the Account section in Settings and the sign-out check */
body.signed-out { overflow: hidden; }
.signin { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto 1fr; overflow-y: auto;
  background: radial-gradient(900px 620px at 50% 38%, rgba(44, 72, 170, 0.34), rgba(20, 32, 80, 0.1) 50%, transparent 72%), linear-gradient(180deg, rgba(8, 12, 23, 0.97), rgba(5, 7, 13, 0.98));
  animation: si-in 0.45s ease both; }
.signin.leaving { animation: si-out 0.42s ease forwards; pointer-events: none; }
@keyframes si-in { from { opacity: 0; } }
@keyframes si-out { to { opacity: 0; visibility: hidden; } }
.signin.leaving .si-card { animation: si-card-out 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes si-card-out { to { opacity: 0; transform: scale(1.04) translateY(-10px); filter: blur(4px); } }
.si-top { display: flex; justify-content: space-between; align-items: center; height: var(--bar-h); padding: 0 18px; }
.si-card { position: relative; place-self: center; width: min(460px, calc(100vw - 32px)); margin: 0 0 6vh; padding: 36px 32px 26px; border-radius: 22px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 23, 42, 0.96), rgba(10, 14, 27, 0.97)); border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 100px -44px var(--accent); animation: si-card 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes si-card { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
.si-card > *:not(.si-orbs) { position: relative; }
.si-orbs { position: absolute; inset: 0; pointer-events: none; }
.si-orbs i { position: absolute; border-radius: 50%; border: 1.5px solid; opacity: 0.55; animation: si-float 7s ease-in-out infinite; }
.si-orbs i:nth-child(1) { width: 120px; height: 120px; left: -36px; top: -40px; border-color: rgba(127, 164, 255, 0.4); background: rgba(93, 139, 255, 0.08); }
.si-orbs i:nth-child(2) { width: 58px; height: 58px; right: 26px; top: 18px; border-color: rgba(255, 127, 176, 0.45); background: rgba(255, 77, 141, 0.08); animation-delay: -2.4s; }
.si-orbs i:nth-child(3) { width: 26px; height: 26px; right: 70px; top: 86px; border-color: rgba(127, 220, 255, 0.5); background: rgba(56, 198, 255, 0.1); animation-delay: -4.6s; }
@keyframes si-float { 50% { transform: translateY(-8px) scale(1.04); } }
.si-card h1 { font: 700 27px var(--display); letter-spacing: -0.035em; }
.si-lead { margin-top: 10px; color: #b9c4dd; font-size: 14.5px; line-height: 1.55; }
.si-form { display: grid; gap: 10px; margin-top: 22px; }
.si-form.shake { animation: si-shake 0.35s ease; }
@keyframes si-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-2px); } }
.si-field { position: relative; }
.si-field input { width: 100%; padding: 14px 76px 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: #070a13; color: var(--text); font: 600 15px ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.03em; outline: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.si-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93, 139, 255, 0.18); }
.si-field input::placeholder { color: var(--dim); }
.si-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--mute); font-weight: 700; font-size: 12.5px; }
.si-eye:hover { color: var(--text); border-color: var(--line-strong); }
.si-go { padding: 13px; border-radius: 12px; border: 0; color: #fff; font: 700 15.5px var(--body); background: linear-gradient(120deg, #4f7cf0, #7b6cff 55%, #e0569b); background-size: 150% 150%; box-shadow: 0 12px 30px -12px rgba(123, 108, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: transform 0.12s, filter 0.2s; }
.si-go:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.si-go:disabled { opacity: 0.7; cursor: progress; }
.si-err { min-height: 20px; margin-top: 10px; color: var(--red); font-weight: 600; font-size: 13.5px; }
.si-or { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; color: var(--dim); font-size: 12.5px; }
.si-or::before, .si-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.si-buy { display: block; padding: 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raise); color: var(--text); font-weight: 700; text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.si-buy:hover { border-color: var(--accent); background: rgba(93, 139, 255, 0.08); }
.si-help { margin-top: 16px; color: var(--mute); font-size: 13px; }

.set-group.acct { border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.acct-line { font-size: 13.5px; color: #c7d0e6; }
.key-row input[readonly] { cursor: default; }
.signout-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); color: #ffb3c0; font-weight: 700; transition: background 0.15s, color 0.15s; }
.signout-btn:hover { background: color-mix(in srgb, var(--red) 18%, transparent); color: #fff; }
.so-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: #070a13; border: 1px solid var(--line-strong); }
.so-key span { grid-column: 1 / -1; color: var(--mute); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.so-key code { font: 600 13.5px ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace; overflow-wrap: anywhere; color: #dfe6f6; user-select: all; }
.btn-danger { border: 0; border-radius: 9px; padding: 9px 18px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #f2667f, #d93a58); box-shadow: 0 8px 22px -10px rgba(239, 78, 106, 0.9); transition: opacity 0.2s, filter 0.2s; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }
