
        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body,
        html {
            margin: 0;
            padding: 0;
            overflow: hidden;
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            height: 100%;
            width: 100%;
            background: #f0f0f0;
        }

        :root {
            --rosa-serasa: #e10075;
            --azul-seguro: #2d3277;
            --bg-chat: #e5ddd5;
            --msg-left: #ffffff;
            --msg-right: #dcf8c6;
            --vh: 1vh;
        }

        /* ===== CHAT CONTAINER ===== */
        .chat-wrapper {
            width: 100%;
            height: 100vh;
            height: calc(var(--vh, 1vh) * 100);
            display: flex;
            flex-direction: column;
            background: var(--bg-chat);
            position: relative;
            overflow: hidden;
        }

        /* ===== HEADER ===== */
        .chat-header {
            background: var(--rosa-serasa);
            color: white;
            display: flex;
            align-items: center;
            padding: 8px 12px;
            gap: 10px;
            z-index: 1000;
            flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            position: relative;
        }

        .header-logo {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            object-fit: contain;
            background: white;
            padding: 2px;
            display: block !important;
        }

        .chat-header .back-arrow {
            font-size: 20px;
            cursor: pointer;
        }

        .chat-header .header-info {
            flex: 1;
        }

        .chat-header .header-name {
            font-weight: bold;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .chat-header .verified-badge {
            width: 16px;
            height: 16px;
            background: #4fc3f7;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: white;
        }

        .chat-header .header-status {
            font-size: 12px;
            opacity: 0.9;
        }

        /* ===== CHAT BODY ===== */
        .chat-body {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 20px;
        }

        /* ===== MESSAGES ===== */
        .msg-row {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            max-width: 85%;
            opacity: 0;
            transform: translateY(15px);
            animation: msgIn 0.4s ease forwards;
            margin-bottom: 4px;
        }

        .msg-row.left {
            align-self: flex-start;
        }

        .msg-row.right {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .msg-bubble {
            padding: 8px 12px;
            border-radius: 12px;
            font-size: 14px;
            line-height: 1.4;
            position: relative;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
            display: inline-block;
            word-wrap: break-word;
        }

        .msg-row.left .msg-bubble {
            background: var(--msg-left);
            border-bottom-left-radius: 4px;
            color: #333;
        }

        .msg-row.right .msg-bubble {
            background: var(--msg-right);
            border-bottom-right-radius: 4px;
            color: #333;
        }

        .msg-time {
            font-size: 10px;
            color: #999;
            margin-left: 8px;
            float: right;
            margin-top: 4px;
        }

        /* ===== TYPING INDICATOR ===== */
        .typing-indicator {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            max-width: 85%;
            align-self: flex-start;
            margin-bottom: 10px;
        }

        .typing-dots {
            background: var(--msg-left);
            padding: 8px 12px;
            border-radius: 12px;
            border-bottom-left-radius: 4px;
            display: flex;
            gap: 4px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .typing-dots span {
            width: 8px;
            height: 8px;
            background: #999;
            border-radius: 50%;
            animation: typingBounce 1.4s infinite;
        }

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

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

        /* ===== AUDIO PLAYER ===== */
        .audio-msg {
            background: var(--msg-left);
            border-radius: 12px;
            border-bottom-left-radius: 4px;
            padding: 8px 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 240px;
            max-width: 100%;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .audio-play-btn {
            width: 36px;
            height: 36px;
            background: var(--rosa-serasa);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .audio-wave {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 2px;
            height: 30px;
        }

        .audio-wave .bar {
            width: 3px;
            background: var(--rosa-serasa);
            border-radius: 2px;
            opacity: 0.5;
        }

        .audio-wave .bar.active {
            opacity: 1;
        }

        .audio-time {
            font-size: 11px;
            color: #888;
            white-space: nowrap;
        }

        .audio-avatar-small {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            object-fit: cover;
        }

        /* ===== IMAGE IN CHAT ===== */
        .msg-image {
            max-width: 280px;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .msg-image img {
            width: 100%;
            display: block;
        }

        /* ===== CARD ACESSO APROVADO ===== */
        .card-aprovado {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
            max-width: 320px;
        }

        .card-aprovado img {
            width: 100%;
            display: block;
        }

        /* ===== CARD DADOS ===== */
        .card-dados {
            background: white;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            max-width: 320px;
        }

        .card-dados .dado-row {
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 10px 14px;
            margin-bottom: 8px;
        }

        .card-dados .dado-label {
            font-size: 11px;
            color: #999;
        }

        .card-dados .dado-value {
            font-size: 14px;
            font-weight: 600;
            color: #333;
        }

        .card-dados .score-bar {
            height: 4px;
            background: linear-gradient(to right, #ff4444, #ff9800, #4caf50);
            border-radius: 2px;
            margin-top: 8px;
        }

        /* ===== BUTTONS ===== */
        .btn-option {
            display: inline-block;
            padding: 12px 24px;
            border-radius: 25px;
            border: none;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
            margin: 0;
        }

        .btn-primary {
            background: var(--rosa-serasa);
            color: white;
            box-shadow: 0 4px 12px rgba(225, 0, 117, 0.3);
        }

        .btn-primary:hover {
            background: #c90068;
            transform: translateY(-1px);
        }

        .btn-secondary {
            background: white;
            color: #666;
            border: 1px solid #ddd;
        }

        .btn-secondary:hover {
            background: #f5f5f5;
        }

        .btn-large {
            display: block;
            width: 100%;
            padding: 16px;
            font-size: 16px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .btn-container {
            display: flex;
            flex-direction: column;
            gap: 0px;
            align-items: flex-end;
            max-width: 85%;
            align-self: flex-end;
        }

        /* ===== INPUT AREA ===== */
        .chat-input-area {
            background: white;
            padding: 10px 15px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-top: 1px solid #eee;
            flex-shrink: 0;
            z-index: 1001;
            padding-bottom: calc(10px + env(safe-area-inset-bottom));
        }

        .chat-input-area input {
            flex: 1;
            border: 2px dashed var(--rosa-serasa);
            border-radius: 25px;
            padding: 12px 18px;
            font-size: 16px;
            outline: none;
            background: #fff;
        }

        .chat-input-area input:focus {
            border-style: solid;
        }

        .chat-input-area button {
            background: var(--rosa-serasa);
            color: white;
            border: none;
            border-radius: 50%;
            width: 44px;
            height: 44px;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        /* ===== WELCOME CARD ===== */
        .msg-row:has(.welcome-card) {
            align-self: center;
            width: 100%;
            max-width: 100%;
            justify-content: center;
        }

        .welcome-card {
            background: var(--rosa-serasa);
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            color: white;
            max-width: 300px;
            margin: 0 auto 10px;
        }

        .welcome-card .welcome-photos img {
            width: 100%;
            max-width: 260px;
            border-radius: 12px;
            margin-bottom: 12px;
        }

        .welcome-card h3 {
            font-size: 18px;
            margin-bottom: 6px;
        }

        .welcome-card p {
            font-size: 13px;
            opacity: 0.9;
        }

        .welcome-card .online-dot {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            font-size: 12px;
        }

        .ponto-vivo {
            width: 8px;
            height: 8px;
            background: #00c853;
            border-radius: 50%;
            animation: blink 1s infinite;
        }

        /* ===== SCORE IMAGE ===== */
        .score-img-container {
            background: white;
            border-radius: 12px;
            padding: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            max-width: 300px;
        }

        .score-img-container img {
            width: 100%;
            display: block;
        }

        /* ===== ACORDO CARD ===== */
        .acordo-card {
            background: white;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            max-width: 320px;
            border-left: 4px solid var(--rosa-serasa);
        }

        .acordo-card .acordo-header {
            font-size: 12px;
            color: #999;
            border-bottom: 1px solid #eee;
            padding-bottom: 8px;
            margin-bottom: 10px;
        }

        .acordo-card .acordo-num {
            font-weight: bold;
            color: var(--rosa-serasa);
            font-size: 14px;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 480px) {
            .chat-header { min-height: 58px; padding: 9px 12px; }
            .msg-row, .btn-container { max-width: 94%; width: auto; }
            .msg-row > div, .msg-bubble, .audio-msg, .card-dados, .acordo-card,
            .card-aprovado, .score-img-container, .msg-image { max-width: 100%; min-width: 0; }
            .audio-msg { width: min(300px, calc(100vw - 42px)); padding: 8px 10px; gap: 7px; }
            .audio-wave { min-width: 0; overflow: hidden; }
            .audio-avatar-small { width: 30px; height: 30px; }
            .chat-body { padding: 10px 10px 16px; overflow-x: hidden; }
            .welcome-card { width: min(300px, calc(100vw - 40px)); }
            .btn-option { white-space: normal; line-height: 1.25; }
        }

        /* ===== ANIMATIONS ===== */
        @keyframes msgIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes typingBounce {

            0%,
            60%,
            100% {
                transform: translateY(0);
            }

            30% {
                transform: translateY(-6px);
            }
        }

        @keyframes blink {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.3;
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .hidden {
            display: none !important;
        }
    