/* --- base.css --- */
/* ============================================
   ZELO CHAT v3.1 — iPHONE CARTOON PRETO & BRANCO
   Squircle iOS + traço cartoon + halftone + mola
   100% monocromático (mesma linguagem da Home)
   © 2026 LITE STUDIO
   ============================================ */

/* ---------- CONTAINER ---------- */
.st-chat-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    background: #000000;
    /* pontinhos halftone (cartoon) */
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1.6px);
    background-size: 16px 16px;
    overflow: hidden;
    height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Rajdhani', sans-serif;
}

@media (min-width: 600px) {
    .st-chat-container {
        left: 50%;
        transform: translateX(-50%);
        max-width: 480px;
        border-left: 2px solid rgba(255,255,255,0.35);
        border-right: 2px solid rgba(255,255,255,0.35);
    }
}

/* ícones brancos no chat (override do dourado global) */
.st-chat-container .st-icon { color: #ffffff !important; }

/* ---------- HEADER ---------- */
.st-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 2px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
    z-index: 20;
    position: relative;
}

.st-chat-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    pointer-events: none;
}

/* Botão voltar (pill cartoon) */
.st-chat-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    background: #101010;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    flex-shrink: 0;
    box-shadow: 0 3px 0 rgba(255,255,255,0.15);
}

.st-chat-back-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(-2px);
}

.st-chat-back-btn:active { transform: translateX(-2px) scale(0.96); }

.st-back-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.st-chat-back-btn:hover .st-back-arrow { transform: translateX(-3px); }
.st-back-text { white-space: nowrap; }

/* Título central */
.st-chat-title {
    flex: 1;
    text-align: center;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.st-chat-title span {
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

/* ---------- MESSAGES WRAPPER ---------- */
.st-chat-messages-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ---------- MESSAGES ---------- */
.st-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

.st-chat-messages::-webkit-scrollbar { width: 4px; }
.st-chat-messages::-webkit-scrollbar-track { background: transparent; }
.st-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }

/* ---------- DATE SEPARATOR ---------- */
.st-chat-date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 12px;
    animation: chatFadeUp 0.4s cubic-bezier(0.16,1,0.3,1);
}

.st-chat-date-line {
    flex: 1;
    max-width: 50px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

.st-chat-date-text {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 14px;
    background: #101010;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 600;
}

/* ---------- MESSAGE ---------- */
.st-chat-msg {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    max-width: 100%;
    padding: 2px 0;
    position: relative;
    animation: chatFadeUp 0.4s cubic-bezier(0.16,1,0.3,1);
    touch-action: pan-y;
}

@keyframes chatFadeUp {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.st-chat-msg-own { flex-direction: row-reverse; }
.st-chat-msg-own .st-chat-msg-content { align-items: flex-end; }

/* ---------- AVATAR ---------- */
.st-chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.85);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
    background: #101010;
    margin-bottom: 2px;
    box-shadow: 0 2px 0 rgba(255,255,255,0.15);
}

.st-chat-msg-avatar:hover { transform: scale(1.08); border-color: #ffffff; }
.st-chat-msg-avatar:active { transform: scale(0.94); }

/* B&W: avatares sempre em grayscale */
.st-chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

.st-chat-msg-avatar-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- CONTENT ---------- */
.st-chat-msg-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 78%;
}

.st-chat-msg-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 0 4px;
}

.st-chat-msg-own .st-chat-msg-header { align-items: flex-end; }

.st-chat-msg-name {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    word-break: break-word;
}

.st-chat-msg-own .st-chat-msg-name { color: rgba(255,255,255,0.85); }

.st-chat-msg-time {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
}

/* ---------- BUBBLE ---------- */
.st-chat-msg-bubble {
    padding: 10px 14px;
    background: #101010;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 22px 22px 22px 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #e8eaed;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
    position: relative;
    transition: background 0.25s ease;
    box-shadow: 0 3px 0 rgba(255,255,255,0.08);
}

.st-chat-msg-bubble:hover { background: #161616; }

/* balão próprio: branco estilo iMessage */
.st-chat-msg-own .st-chat-msg-bubble {
    background: #ffffff;
    border-color: #ffffff;
    border-radius: 22px 22px 6px 22px;
    color: #000000;
    box-shadow: 0 3px 0 rgba(255,255,255,0.25);
}

.st-chat-msg-own .st-chat-msg-bubble:hover { background: #f2f2f2; }

.st-chat-link {
    color: #ffffff;
    text-decoration: underline;
    word-break: break-all;
}

/* ---------- REPLY REF (dentro da bubble) ---------- */
.st-chat-msg-reply-ref {
    display: block;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.07);
    border-left: 3px solid rgba(255,255,255,0.6);
    border-radius: 10px;
}

.st-chat-msg-reply-ref-name {
    display: block;
    font-family: inherit;
    font-weight: 800;
    color: #ffffff;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.st-chat-msg-reply-ref-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: inherit;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.35;
    word-break: break-word;
}

/* reply ref dentro do balão branco */
.st-chat-msg-own .st-chat-msg-reply-ref {
    background: rgba(0,0,0,0.07);
    border-left-color: rgba(0,0,0,0.55);
}

/* ---------- SWIPE REPLY ICON ---------- */
.st-chat-swipe-reply {
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
    z-index: -1;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.st-chat-swipe-reply svg { width: 18px; height: 18px; }
.st-chat-msg.swiping .st-chat-swipe-reply { opacity: 1; }

.st-chat-msg.swipe-ready .st-chat-swipe-reply {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(255,255,255,0.6);
}

/* ---------- INPUT AREA ---------- */
.st-chat-input-area {
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 2px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 100%;
    will-change: transform, bottom;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.st-chat-input-area.keyboard-open { box-shadow: 0 -4px 24px rgba(0,0,0,0.6); }

/* ---------- REPLY PREVIEW ---------- */
.st-chat-reply-preview {
    display: none;
    position: relative;
    padding: 10px 48px 10px 16px;
    background: #101010;
    border-left: 4px solid #ffffff;
    border-bottom: 2px solid rgba(255,255,255,0.15);
    animation: chatFadeUp 0.3s cubic-bezier(0.16,1,0.3,1);
    flex-shrink: 0;
}

.st-chat-reply-preview.active { display: block; }

.st-chat-reply-preview-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.4);
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
    line-height: 1;
}

.st-chat-reply-preview-close:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-50%) rotate(90deg);
}

.st-chat-reply-content-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 3px;
    font-weight: 600;
}

.st-chat-reply-content-name {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.st-chat-reply-content-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- INPUT WRAPPER ---------- */
.st-chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #101010;
    border: 2px solid rgba(255,255,255,0.45);
    border-radius: 26px;
    padding: 6px 6px 6px 16px;
    margin: 8px 12px;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    cursor: text;
    min-height: 44px;
}

.st-chat-input-wrapper.focused,
.st-chat-input-wrapper:focus-within {
    border-color: #ffffff;
    background: #141414;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12), 0 4px 0 rgba(255,255,255,0.1);
}

.st-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e8eaed;
    font-family: inherit;
    font-size: 16px;
    resize: none;
    max-height: 110px;
    min-height: 26px;
    padding: 6px 0;
    line-height: 1.4;
    overflow-y: auto;
    -webkit-user-select: text;
    user-select: text;
    cursor: text;
    caret-color: #ffffff;
}

.st-chat-input::placeholder {
    color: rgba(255,255,255,0.3);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.st-chat-counter {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: rgba(255,255,255,0.35);
    padding: 0 4px 6px 0;
    flex-shrink: 0;
    align-self: flex-end;
    transition: color 0.3s ease;
}

.st-chat-counter.warning { color: rgba(255,255,255,0.7); }
.st-chat-counter.danger { color: #ffffff; font-weight: 700; }

/* ---------- SEND BUTTON (pill branco cartoon) ---------- */
.st-chat-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
    flex-shrink: 0;
    box-shadow: 0 3px 0 rgba(255,255,255,0.3);
}

.st-chat-send-btn:disabled {
    background: #2a2a2a;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
}

.st-chat-send-btn:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 3px 0 rgba(255,255,255,0.3), 0 0 18px rgba(255,255,255,0.4);
}

.st-chat-send-btn:not(:disabled):active { transform: scale(0.9); }

/* ---------- TYPING ---------- */
.st-chat-typing {
    display: none;
    padding: 6px 16px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.st-chat-typing.active { display: flex; }
.st-typing-dots { display: flex; gap: 4px; }

.st-typing-dots span {
    width: 5px; height: 5px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

.st-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.st-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%,60%,100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- EMPTY / LOADING / ERROR ---------- */
.st-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 40px 20px;
    animation: chatFadeUp 0.5s ease;
}

.st-chat-empty-icon {
    width: 90px; height: 90px;
    background: #101010;
    border: 2px solid #ffffff;
    border-radius: 30px;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    box-shadow: 0 6px 0 rgba(255,255,255,0.2);
    animation: chatFloat 3s ease-in-out infinite;
}

.st-chat-empty-icon .st-icon { color: #ffffff !important; }

@keyframes chatFloat {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.st-chat-empty-title {
    font-family: inherit;
    font-size: 1.15rem;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

.st-chat-empty-desc {
    font-family: inherit;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    max-width: 260px;
    line-height: 1.5;
}

.st-chat-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255,255,255,0.4);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.st-chat-loading-spinner {
    width: 34px; height: 34px;
    border: 3px solid rgba(255,255,255,0.12);
    border-top-color: #ffffff;
    border-right-color: #ffffff;
    border-radius: 50%;
    animation: chatSpin 0.8s linear infinite;
}

@keyframes chatSpin { to { transform: rotate(360deg); } }

.st-chat-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.7);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.st-chat-retry-btn {
    padding: 12px 26px;
    background: #ffffff;
    border: none;
    color: #000000;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 4px 0 rgba(255,255,255,0.3);
}

.st-chat-retry-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(255,255,255,0.3), 0 0 18px rgba(255,255,255,0.35); }
.st-chat-retry-btn:active { transform: translateY(2px) scale(0.96); box-shadow: 0 1px 0 rgba(255,255,255,0.3); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 380px) {
    .st-chat-header { padding: 10px 12px; }
    .st-chat-title { font-size: 1.05rem; letter-spacing: 0.14em; }
    .st-back-text { display: none; }
    .st-chat-messages { padding: 12px 10px 20px; }
    .st-chat-msg-avatar { width: 32px; height: 32px; }
    .st-chat-msg-bubble { font-size: 0.9rem; padding: 9px 12px; }
    .st-chat-msg-content { max-width: 82%; }
    .st-chat-input-wrapper { margin: 6px 10px; padding: 5px 5px 5px 14px; }
    .st-chat-send-btn { width: 36px; height: 36px; min-width: 36px; }
}

@media (min-width: 600px) {
    .st-chat-messages { padding: 20px 18px 28px; }
    .st-chat-msg-avatar { width: 40px; height: 40px; }
    .st-chat-msg-bubble { font-size: 1rem; padding: 11px 16px; }
    .st-chat-input-wrapper { margin: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .st-chat-msg, .st-chat-date-separator, .st-chat-empty-icon,
    .st-chat-loading-spinner, .st-typing-dots span {
        animation: none !important;
    }
}

/* --- ui.css --- */
/* ============================================
   ZELO CHAT v3.1 — UI
   Modais, toasts, report — iPHONE CARTOON B&W
   © 2026 LITE STUDIO
   ============================================ */

/* ---------- REPORT MODAL ---------- */
.st-chat-report-modal {
    max-width: 380px;
    background: #101010;
    border: 2px solid #ffffff;
    border-radius: 28px;
    clip-path: none;
    box-shadow: 0 8px 0 rgba(255,255,255,0.1), 0 24px 60px rgba(0,0,0,0.8);
    padding: 24px;
}

.st-chat-report-reasons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.st-chat-reason-btn {
    padding: 12px 14px;
    background: #1c1c1c;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    color: rgba(255,255,255,0.8);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    text-transform: uppercase;
}

.st-chat-reason-btn:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
    transform: translateY(-1px);
}

.st-chat-reason-btn:active { transform: scale(0.96); }

/* ---------- USER MODAL ---------- */
.st-chat-user-modal {
    max-width: 400px;
    background: #101010;
    border: 2px solid #ffffff;
    border-radius: 28px;
    clip-path: none;
    box-shadow: 0 8px 0 rgba(255,255,255,0.1), 0 24px 60px rgba(0,0,0,0.8);
}

.st-chat-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #1c1c1c;
    border-radius: 18px;
    margin-bottom: 16px;
    border: 2px solid rgba(255,255,255,0.2);
}

.st-chat-user-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    font-family: inherit;
    font-size: 1.4rem; font-weight: 800;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.85);
    overflow: hidden;
    background: #101010;
}

.st-chat-user-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

.st-chat-user-details { flex: 1; min-width: 0; }

.st-chat-user-name {
    font-family: inherit;
    font-size: 1.1rem; font-weight: 800;
    color: #ffffff; letter-spacing: 0.04em;
    text-transform: uppercase; margin-bottom: 2px;
}

.st-chat-user-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem; color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}

/* ---------- AUTH MODAL ---------- */
.st-chat-auth-modal {
    max-width: 380px;
    background: #101010;
    border: 2px solid #ffffff;
    border-radius: 28px;
    clip-path: none;
    box-shadow: 0 8px 0 rgba(255,255,255,0.1), 0 24px 60px rgba(0,0,0,0.8);
}

.st-chat-auth-icon {
    width: 60px; height: 60px;
    margin: 0 auto 16px;
    background: #1c1c1c;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 0 rgba(255,255,255,0.15);
}

.st-chat-auth-icon .st-icon { color: #ffffff !important; }

.st-chat-auth-input-wrapper { position: relative; margin-bottom: 12px; }

.st-chat-auth-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 60px;
    background: #1c1c1c;
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 14px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
}

.st-chat-auth-input:focus {
    border-color: #ffffff;
    background: #202020;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.st-chat-auth-counter {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.65rem; color: rgba(255,255,255,0.4);
}

.st-chat-auth-error {
    padding: 10px 14px;
    background: #1c1c1c;
    border: 2px dashed rgba(255,255,255,0.5);
    border-radius: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.st-chat-auth-rules {
    display: flex; flex-direction: column; gap: 8px;
    padding: 12px;
    background: #1c1c1c;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    margin-bottom: 16px;
}

.st-chat-rule {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: rgba(255,255,255,0.7);
}

.st-chat-rule .st-icon { color: #ffffff !important; flex-shrink: 0; }

/* ---------- TOAST (cartão branco cartoon) ---------- */
.st-chat-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    padding: 10px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    z-index: 10000;
    box-shadow: 0 5px 0 rgba(255,255,255,0.35), 0 10px 30px rgba(0,0,0,0.6);
}

.st-chat-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- SHAKE ---------- */
@keyframes chatShake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.st-chat-shake { animation: chatShake 0.3s ease; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 380px) {
    .st-chat-report-reasons { grid-template-columns: 1fr; }
    .st-chat-user-avatar { width: 48px; height: 48px; font-size: 1.2rem; }
    .st-chat-user-name { font-size: 0.95rem; }
}

@media (min-width: 600px) {
    .st-chat-user-avatar { width: 64px; height: 64px; font-size: 1.6rem; }
    .st-chat-user-name { font-size: 1.2rem; }
}

/* ============================================
   ✅ OVERRIDES PRETO-NO-BRANCO (v3.1 — CORRIGIDO)
   O global.css força branco nas DIVS com
   especificidade (0,2,1):
   div:not(.zb-container):not(.zb-container *)
   Por isso tudo aqui usa prefixo .st-chat-container
   para chegar em (0,3,0) e vencer com !important.
   ============================================ */

/* Balão próprio (branco) → TODO texto interno preto */
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble { color: #000000 !important; }
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble span,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble p,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble a,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble b,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble i,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble em,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble strong,
.st-chat-container .st-chat-msg-own .st-chat-msg-bubble u {
    color: #000000 !important;
}

/* Citação de resposta dentro do balão branco */
.st-chat-container .st-chat-msg-own .st-chat-msg-reply-ref {
    background: rgba(0,0,0,0.07);
    border-left-color: rgba(0,0,0,0.55);
}
.st-chat-container .st-chat-msg-own .st-chat-msg-reply-ref-name { color: rgba(0,0,0,0.7) !important; }
.st-chat-container .st-chat-msg-own .st-chat-msg-reply-ref-text { color: rgba(0,0,0,0.8) !important; }

/* Ícone de swipe reply (círculo branco → seta preta) */
.st-chat-container .st-chat-msg .st-chat-swipe-reply { color: #000000 !important; }

/* Botão enviar (svg usa currentColor) */
.st-chat-container .st-chat-send-btn { color: #000000 !important; }
.st-chat-container .st-chat-send-btn:disabled { color: #666666 !important; }

/* Fechar reply preview no hover (fundo branco) */
.st-chat-container .st-chat-reply-preview-close:hover { color: #000000 !important; }

/* Botões de denúncia no hover (fundo branco) */
.st-chat-container .st-chat-reason-btn:hover { color: #000000 !important; }

/* Badge MOD (fundo branco) */
.st-chat-container .st-chat-msg-name .st-chat-badge { color: #000000 !important; }

/* Toast branco (elemento solto no body → espelha o :not do global p/ vencer) */
.st-chat-toast:not(.zb-container):not(.zb-container *) { color: #000000 !important; }

/* Tons de cinza que o global tentava branquear */
.st-chat-container .st-chat-msg-time { color: rgba(255,255,255,0.4) !important; }
.st-chat-container .st-chat-title span { color: rgba(255,255,255,0.4) !important; }
.st-chat-container .st-chat-counter { color: rgba(255,255,255,0.35) !important; }
.st-chat-container .st-chat-msg-own .st-chat-msg-name { color: rgba(255,255,255,0.85) !important; }