*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

body{
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
    background:
        radial-gradient(circle at top left,rgba(247,147,26,.12),transparent 28%),
        radial-gradient(circle at bottom right,rgba(255,215,0,.08),transparent 30%),
        #0b0e11;
    color:#fff;
    overflow:hidden;
}

.chat-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.chat-box{
    width:100%;
    max-width:780px;
    height:calc(100vh - 36px);
    max-height:920px;
    background:#111418;
    border:1px solid rgba(255,255,255,.06);
    border-radius:28px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    box-shadow:
        0 20px 60px rgba(0,0,0,.55),
        0 0 30px rgba(247,147,26,.08);
    backdrop-filter:blur(10px);
}

.chat-header{
    background:
        linear-gradient(135deg,#111418,#161a20,#1f2630);
    border-bottom:1px solid rgba(255,255,255,.06);
    padding:18px;
    display:flex;
    align-items:center;
    gap:14px;
}

.support-avatar{
    width:56px;
    height:56px;
    border-radius:18px;
    background:linear-gradient(135deg,#f7931a,#ffcc00);
    color:#111;
    font-weight:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    box-shadow:
        0 0 25px rgba(247,147,26,.4);
}

.chat-header h3{
    font-size:20px;
    margin-bottom:5px;
    color:#fff;
}

.chat-header p{
    font-size:13px;
    color:#cbd5e1;
}

.user-strip{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    padding:12px 14px;
    background:#0f1318;
    border-bottom:1px solid rgba(255,255,255,.05);
}

.user-chip{
    background:#1b2028;
    border:1px solid rgba(255,255,255,.06);
    color:#d1d5db;
    padding:7px 11px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.user-chip.registered{
    background:rgba(34,197,94,.12);
    color:#4ade80;
    border-color:rgba(34,197,94,.25);
}

.chat-welcome{
    margin:14px;
    padding:15px;
    border-radius:18px;
    background:
        linear-gradient(135deg,rgba(247,147,26,.15),rgba(255,215,0,.08));
    border:1px solid rgba(247,147,26,.25);
    color:#f8fafc;
    font-size:14px;
    line-height:1.6;
}

.quick-help{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding:0 14px 14px;
    scrollbar-width:none;
}

.quick-help::-webkit-scrollbar{
    display:none;
}

.quick-help button{
    border:none;
    background:#1b2028;
    color:#f1f5f9;
    padding:10px 14px;
    border-radius:999px;
    white-space:nowrap;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    transition:.25s ease;
    border:1px solid rgba(255,255,255,.05);
}

.quick-help button:hover{
    background:#f7931a;
    color:#111;
    transform:translateY(-1px);
    box-shadow:0 0 18px rgba(247,147,26,.35);
}

.chat-messages{
    flex:1;
    overflow-y:auto;
    padding:18px;
    background:
        linear-gradient(rgba(11,14,17,.90),rgba(11,14,17,.90)),
        url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
}

.chat-messages::-webkit-scrollbar{
    width:6px;
}

.chat-messages::-webkit-scrollbar-thumb{
    background:#2b3139;
    border-radius:999px;
}

.message-row{
    display:flex;
    margin-bottom:14px;
}

.message-row.user{
    justify-content:flex-end;
}

.message-row.admin{
    justify-content:flex-start;
}

.message-bubble{
    max-width:82%;
    padding:13px 15px;
    border-radius:18px;
    line-height:1.5;
    font-size:14px;
    position:relative;
    word-wrap:break-word;
}

.message-row.user .message-bubble{
    background:linear-gradient(135deg,#f7931a,#ffcc00);
    color:#111;
    border-bottom-right-radius:6px;
    font-weight:600;
}

.message-row.admin .message-bubble{
    background:#1b2028;
    color:#f8fafc;
    border-bottom-left-radius:6px;
    border:1px solid rgba(255,255,255,.05);
}

.message-time{
    display:block;
    margin-top:6px;
    font-size:11px;
    opacity:.75;
}

.file-preview{
    display:none;
    margin:0 14px 10px;
    padding:11px 14px;
    border-radius:14px;
    background:rgba(247,147,26,.12);
    border:1px dashed rgba(247,147,26,.4);
    color:#fbbf24;
    font-size:13px;
    font-weight:700;
}

.chat-form{
    display:flex;
    align-items:flex-end;
    gap:8px;
    padding:12px;
    background:#0f1318;
    border-top:1px solid rgba(255,255,255,.05);
}

.attach-btn{
    width:48px;
    height:48px;
    border-radius:50%;
    background:#1b2028;
    border:1px solid rgba(255,255,255,.06);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:20px;
    flex-shrink:0;
    color:#fbbf24;
    transition:.25s ease;
}

.attach-btn:hover{
    background:#f7931a;
    color:#111;
}

.attach-btn input{
    display:none;
}

.chat-form textarea{
    flex:1;
    min-height:48px;
    max-height:130px;
    resize:none;
    border:none;
    outline:none;
    border-radius:22px;
    padding:14px 16px;
    background:#1b2028;
    color:#fff;
    font-size:15px;
    font-family:inherit;
}

.chat-form textarea::placeholder{
    color:#94a3b8;
}

.chat-form textarea:focus{
    box-shadow:
        0 0 0 2px rgba(247,147,26,.25);
}

.chat-form button{
    border:none;
    min-width:72px;
    height:48px;
    border-radius:999px;
    background:linear-gradient(135deg,#f7931a,#ffcc00);
    color:#111;
    font-weight:900;
    cursor:pointer;
    transition:.25s ease;
    flex-shrink:0;
}

.chat-form button:hover{
    transform:translateY(-1px);
    box-shadow:
        0 0 18px rgba(247,147,26,.35);
}

.chat-form button:disabled{
    opacity:.65;
    cursor:not-allowed;
}

.chat-image{
    max-width:240px;
    border-radius:14px;
    margin-top:8px;
    display:block;
}

.chat-pdf{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:8px;
    text-decoration:none;
    background:#232a34;
    color:#fbbf24;
    padding:10px 12px;
    border-radius:12px;
    font-weight:700;
}

.typing-indicator{
    padding:10px 14px;
    color:#94a3b8;
    font-size:12px;
}

@media(max-width:768px){

    body{
        overflow:hidden;
    }

    .chat-page{
        padding:0;
        align-items:stretch;
    }

    .chat-box{
        height:100vh;
        max-height:none;
        border-radius:0;
        max-width:none;
    }

    .chat-header{
        padding:15px 12px;
    }

    .support-avatar{
        width:48px;
        height:48px;
        border-radius:15px;
        font-size:18px;
    }

    .chat-header h3{
        font-size:18px;
    }

    .chat-header p{
        font-size:12px;
    }

    .user-strip{
        flex-wrap:nowrap;
        overflow-x:auto;
        scrollbar-width:none;
    }

    .user-strip::-webkit-scrollbar{
        display:none;
    }

    .chat-welcome{
        margin:10px;
        font-size:13px;
    }

    .quick-help{
        padding:0 10px 12px;
    }

    .chat-messages{
        padding:12px 10px;
    }

    .message-bubble{
        max-width:90%;
        font-size:13px;
    }

    .chat-form{
        gap:6px;
        padding:
            10px
            10px
            20px
            10px;
    }

    .attach-btn{
        width:44px;
        height:44px;
        font-size:18px;
    }

    .chat-form textarea{
        min-height:44px;
        padding:12px 14px;
        font-size:14px;
    }

    .chat-form button{
        min-width:60px;
        height:44px;
        font-size:13px;
    }
}