*{box-sizing:border-box}

html,body{
    margin:0;
    min-height:100%;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color:#102f49;
}

button,input,textarea{font:inherit}
button{cursor:pointer}

.auth-bg{
    min-height:100vh;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#eef7fc,#dcebf5);
    padding:24px;
}

.auth-card{
    width:min(560px,100%);
    background:#fff;
    border-radius:28px;
    padding:42px 46px;
    box-shadow:0 24px 70px #173b5a20;
}

.brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin-bottom:28px;
}

.brand-mark{
    width:58px;
    height:58px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#10a3e8,#06477e);
    color:#fff;
    font-size:34px;
    font-weight:900;
    transform:rotate(-10deg);
    box-shadow:0 8px 22px #087fc733;
}

.brand-mark.small{
    width:38px;
    height:38px;
    font-size:20px;
}

.brand-name{
    font-size:38px;
    font-weight:900;
    letter-spacing:-2px;
    color:#0a355d;
}

.brand-name span,
.mini-brand i{
    font-style:normal;
    color:#1296d3;
}

.tagline{
    font-size:15px;
    color:#557188;
}

.form{
    display:grid;
    gap:15px;
}

.form label{
    display:grid;
    gap:7px;
    font-weight:650;
    font-size:15px;
}

.form input,
.form textarea,
.search input{
    border:1px solid #cbd8e4;
    border-radius:13px;
    padding:13px 15px;
    outline:none;
    background:#fbfdff;
    transition:.2s ease;
}

.form input:focus,
.search input:focus,
.composer textarea:focus{
    border-color:#1796d1;
    box-shadow:0 0 0 3px #1796d118;
}

.primary,
.secondary,
.danger,
.ghost{
    border:0;
    border-radius:13px;
    padding:13px 18px;
    font-weight:800;
    transition:.2s ease;
}

.primary{
    background:linear-gradient(135deg,#0b568d,#073e70);
    color:#fff;
}

.primary:hover{
    transform:translateY(-1px);
    box-shadow:0 7px 18px #073e7033;
}

.secondary{
    background:#e7f4fb;
    color:#0b527e;
}

.secondary:hover{
    background:#d9edf8;
}

.danger{
    background:#c83d4c;
    color:#fff;
}

.danger:hover{
    background:#b93240;
}

.ghost{
    background:#eef4f8;
    color:#29445c;
}

.ghost:hover{
    background:#e1ebf1;
}

.wide{width:100%}

.check{
    display:flex!important;
    align-items:center;
    gap:8px!important;
    font-weight:500!important;
}

.check input{width:auto}

.auth-links{
    display:flex;
    justify-content:space-between;
    margin-top:22px;
}

.auth-links.single{justify-content:center}

.auth-links a{
    color:#0b5d92;
    text-decoration:none;
    font-weight:700;
}

.notice{
    margin-bottom:14px;
    padding:11px 13px;
    border-radius:10px;
    font-size:14px;
}

.notice.ok{
    background:#e8f7ef;
    color:#17663a;
}

.notice.error{
    background:#fff0f1;
    color:#a82f3a;
}

.hidden{display:none!important}


/* =========================
   CHAT APP
========================= */

.chat-bg{
    background:#eaf1f6;
    height:100vh;
    overflow:hidden;
}

.app-shell{
    height:100vh;
    display:grid;
    grid-template-columns:330px 1fr;
    background:#eef4f8;
}


/* =========================
   SIDEBAR
========================= */

.sidebar{
    background:rgba(255,255,255,.97);
    border-right:1px solid #d8e3eb;
    display:flex;
    flex-direction:column;
    min-width:0;
    box-shadow:4px 0 20px #183b5208;
    z-index:3;
}

.side-head{
    height:70px;
    padding:14px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid #edf1f4;
}

.mini-brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:21px;
    letter-spacing:-.5px;
}

.me-card{
    display:flex;
    align-items:center;
    gap:12px;
    padding:17px 18px;
}

.me-card b{
    font-size:15px;
}

.me-card small,
.chat-user small{
    display:block;
    color:#7990a2;
    margin-top:3px;
    font-size:12px;
}


/* =========================
   AVATAR
========================= */

.avatar{
    width:44px;
    height:44px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#e4f5fd,#cceafa);
    color:#12699c;
    font-weight:800;
    flex:none;
    border:2px solid #fff;
    box-shadow:0 3px 12px #17618a18;
    overflow:hidden;
}

.avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}


/* =========================
   SEARCH
========================= */

.search{
    margin:0 15px 12px;
    background:#f1f6f9;
    border:1px solid #e2ebf0;
    border-radius:14px;
    padding:8px 12px;
    display:flex;
    align-items:center;
    gap:8px;
    color:#789;
    transition:.2s ease;
}

.search:focus-within{
    background:#fff;
    border-color:#8ecde8;
    box-shadow:0 0 0 3px #1796d112;
}

.search span{
    font-size:17px;
}

.search input{
    border:0;
    background:transparent;
    padding:7px 4px;
    width:100%;
    box-shadow:none;
}


/* =========================
   USER LIST
========================= */

.user-list{
    overflow:auto;
    flex:1;
    padding:3px 8px 10px;
}

.user-list::-webkit-scrollbar,
.messages::-webkit-scrollbar{
    width:6px;
}

.user-list::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb{
    background:#cbd9e2;
    border-radius:20px;
}

.user-item{
    display:flex;
    align-items:center;
    gap:11px;
    padding:11px 10px;
    margin:2px 0;
    border-left:3px solid transparent;
    border-radius:13px;
    transition:.18s ease;
}

.user-item:hover{
    background:#f1f8fc;
}

.user-item.active{
    background:#e8f5fc;
    border-left-color:#128bd0;
}

.user-main{
    min-width:0;
    flex:1;
}

.user-main b{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:14px;
}

.user-main small{
    color:#7c91a2;
    font-size:11px;
}

.dot{
    display:inline-block;
    width:8px;
    height:8px;
    border-radius:50%;
    background:#c6d0d7;
    margin-right:5px;
}

.dot.on{
    background:#21b36b;
    box-shadow:0 0 0 3px #21b36b18;
}


/* =========================
   SIDEBAR BOTTOM
========================= */

.side-bottom{
    padding:14px;
    border-top:1px solid #edf1f4;
}


/* =========================
   CHAT AREA
========================= */

.chat-pane{
    display:grid;
    grid-template-rows:74px 25px 1fr 76px;
    min-width:0;
    background:#edf3f7;
}


/* =========================
   CHAT HEADER
========================= */

.chat-head{
    background:rgba(255,255,255,.98);
    border-bottom:1px solid #dbe5ec;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 20px;
    box-shadow:0 2px 10px #173d5208;
    z-index:2;
}

.chat-head .avatar{
    width:45px;
    height:45px;
}

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

.chat-user b{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:15px;
}

.chat-user small{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.call-actions{
    display:flex;
    gap:7px;
}


/* =========================
   ICON BUTTONS
========================= */

.icon-btn{
    border:0;
    background:#edf5f9;
    color:#0b5e8c;
    width:42px;
    height:42px;
    border-radius:13px;
    font-weight:800;
    display:inline-grid;
    place-items:center;
    transition:.18s ease;
}

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

.icon-btn:active{
    transform:scale(.95);
}


/* =========================
   TYPING
========================= */

.typing{
    font-size:12px;
    color:#1982b6;
    padding:5px 22px;
    min-height:25px;
}


/* =========================
   MESSAGE AREA
========================= */

.messages{
    overflow:auto;
    padding:26px 6%;
    display:flex;
    flex-direction:column;
    gap:8px;
    background:
        radial-gradient(circle at 20% 0%,#ffffffaa,transparent 35%),
        radial-gradient(circle at 90% 100%,#dcecf5aa,transparent 35%),
        #edf4f8;
    scroll-behavior:smooth;
}


/* =========================
   EMPTY CHAT
========================= */

.empty-state{
    margin:auto;
    text-align:center;
    color:#6d8497;
    max-width:420px;
}

.empty-icon{
    width:76px;
    height:76px;
    margin:0 auto 15px;
    border-radius:24px;
    display:grid;
    place-items:center;
    font-size:38px;
    background:#e2f2fa;
    box-shadow:0 10px 30px #195c7b12;
}

.empty-state h2{
    margin:0 0 7px;
    color:#244b66;
    font-size:22px;
}

.empty-state p{
    margin:0;
    line-height:1.6;
    font-size:14px;
}


/* =========================
   MESSAGE BUBBLES
========================= */

.msg{
    max-width:min(70%,620px);
    padding:10px 13px;
    border-radius:17px;
    background:#fff;
    box-shadow:0 3px 14px #23435a0c;
    align-self:flex-start;
    position:relative;
    border:1px solid #e7eef3;
    line-height:1.45;
    animation:messageIn .18s ease-out;
}

.msg:not(.mine){
    border-bottom-left-radius:5px;
}

.msg.mine{
    background:linear-gradient(135deg,#dff5ff,#d2effd);
    align-self:flex-end;
    border-color:#c6e8f7;
    color:#103e59;
    border-bottom-right-radius:5px;
}

.msg.deleted{
    font-style:italic;
    color:#7b8c99;
    background:#f5f7f8;
}

.msg .meta{
    font-size:10px;
    color:#7890a2;
    margin-top:5px;
    text-align:right;
}

.msg.mine .meta{
    color:#63879b;
}

.msg img{
    max-width:100%;
    max-height:300px;
    border-radius:12px;
    display:block;
    margin-bottom:4px;
}

.msg audio{
    max-width:100%;
}

.file-link{
    display:flex;
    gap:10px;
    align-items:center;
    color:#0b5d92;
    text-decoration:none;
    font-weight:700;
    padding:4px;
}

.file-link:hover{
    text-decoration:underline;
}

@keyframes messageIn{
    from{
        opacity:0;
        transform:translateY(5px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}


/* =========================
   MESSAGE COMPOSER
========================= */

.composer{
    position:relative;
    background:rgba(255,255,255,.98);
    border-top:1px solid #dbe5ec;
    padding:12px 18px;
    display:flex;
    align-items:center;
    gap:8px;
    box-shadow:0 -4px 15px #173d5207;
}

.composer textarea{
    flex:1;
    resize:none;
    border:1px solid #d3e0e8;
    border-radius:17px;
    padding:12px 15px;
    min-height:48px;
    max-height:120px;
    outline:none;
    background:#f8fbfd;
    transition:.2s ease;
    line-height:22px;
}

.composer textarea:focus{
    background:#fff;
}

.composer textarea:disabled{
    cursor:not-allowed;
    opacity:.7;
}

.send-btn{
    width:48px;
    height:48px;
    border:0;
    border-radius:15px;
    background:linear-gradient(135deg,#0d6ca4,#073f70);
    color:#fff;
    font-size:20px;
    display:grid;
    place-items:center;
    box-shadow:0 6px 15px #0750802b;
    transition:.18s ease;
}

.send-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px #0750803b;
}

.send-btn:active{
    transform:scale(.94);
}


/* =========================
   EMOJI PICKER
========================= */

.emoji-picker{
    position:absolute;
    bottom:70px;
    left:10px;
    width:290px;
    max-height:330px;
    overflow:auto;
    background:#fff;
    border:1px solid #d7e1e8;
    border-radius:17px;
    padding:11px;
    box-shadow:0 18px 45px #15344a25;
    display:grid;
    grid-template-columns:repeat(8,1fr);
    gap:5px;
    z-index:10;
}

.emoji-picker button{
    border:0;
    background:#f3f7f9;
    border-radius:9px;
    font-size:21px;
    padding:7px 4px;
    transition:.15s ease;
}

.emoji-picker button:hover{
    background:#e1f1f8;
    transform:scale(1.08);
}


/* =========================
   MODALS
========================= */

.modal{
    position:fixed;
    inset:0;
    background:#0b263b77;
    backdrop-filter:blur(5px);
    display:grid;
    place-items:center;
    z-index:20;
    padding:20px;
}

.modal-card{
    position:relative;
    width:min(500px,100%);
    max-height:90vh;
    overflow:auto;
    background:#fff;
    border-radius:23px;
    padding:27px;
    box-shadow:0 25px 70px #092b421f;
}

.modal-card h2{
    margin-top:0;
    color:#153d59;
}

.small-card{
    text-align:center;
}

.modal-close{
    position:absolute;
    right:15px;
    top:10px;
    border:0;
    background:transparent;
    font-size:28px;
    color:#678;
    width:38px;
    height:38px;
    border-radius:50%;
}

.modal-close:hover{
    background:#eef4f7;
}

.modal-actions{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-top:20px;
}


/* =========================
   CALL WINDOW
========================= */

.call-card{
    position:relative;
    width:min(900px,100%);
    height:min(80vh,650px);
    background:#081a2a;
    border-radius:23px;
    overflow:hidden;
    box-shadow:0 25px 80px #00142166;
}

.call-card #remoteVideo{
    width:100%;
    height:100%;
    object-fit:cover;
    background:#071521;
}

.call-card #localVideo{
    position:absolute;
    right:18px;
    bottom:70px;
    width:180px;
    height:130px;
    object-fit:cover;
    border-radius:14px;
    border:2px solid #fff;
    background:#102536;
    box-shadow:0 7px 25px #0005;
}

.call-top{
    position:absolute;
    z-index:2;
    top:15px;
    left:15px;
    right:15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    color:#fff;
    background:#071c2dbb;
    backdrop-filter:blur(8px);
    padding:8px 10px 8px 14px;
    border-radius:13px;
}

.call-controls{
    position:absolute;
    bottom:15px;
    left:0;
    right:0;
    text-align:center;
}


/* =========================
   ATTACHMENT BUTTON
========================= */

.attach{
    position:relative;
    overflow:hidden;
}

.attach input{
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
}


/* =========================
   MOBILE
========================= */

.mobile-only{
    display:none;
}

@media(max-width:900px){

    .app-shell{
        grid-template-columns:290px 1fr;
    }

    .messages{
        padding-left:4%;
        padding-right:4%;
    }

    .msg{
        max-width:76%;
    }
}

@media(max-width:760px){

    .chat-bg{
        height:100dvh;
    }

    .app-shell{
        height:100dvh;
        grid-template-columns:1fr;
    }

    .sidebar{
        position:absolute;
        inset:0 auto 0 0;
        width:100%;
        z-index:5;
    }

    .chat-pane{
        display:none;
        height:100dvh;
        grid-template-rows:68px 24px 1fr 70px;
    }

    .app-shell.chat-open .sidebar{
        display:none;
    }

    .app-shell.chat-open .chat-pane{
        display:grid;
    }

    .mobile-only{
        display:inline-grid;
    }

    .chat-head{
        padding:10px 12px;
        gap:8px;
    }

    .chat-head .avatar{
        width:40px;
        height:40px;
    }

    .call-actions{
        gap:4px;
    }

    .call-actions .icon-btn{
        width:38px;
        height:38px;
    }

    .messages{
        padding:18px 12px;
        gap:7px;
    }

    .msg{
        max-width:88%;
        padding:9px 11px;
    }

    .composer{
        padding:9px 10px;
        gap:6px;
    }

    .composer .icon-btn{
        width:39px;
        height:39px;
    }

    .composer textarea{
        min-height:43px;
        border-radius:15px;
        padding:10px 12px;
    }

    .send-btn{
        width:43px;
        height:43px;
        border-radius:13px;
    }

    .emoji-picker{
        left:7px;
        bottom:62px;
        width:calc(100vw - 14px);
        grid-template-columns:repeat(8,1fr);
    }

    .call-card{
        height:70vh;
        border-radius:18px;
    }

    .call-card #localVideo{
        width:120px;
        height:90px;
        right:10px;
        bottom:62px;
    }

    .auth-card{
        padding:30px 22px;
        border-radius:22px;
    }

    .brand-name{
        font-size:30px;
    }

    .modal{
        padding:12px;
    }

    .modal-card{
        padding:22px;
        border-radius:19px;
    }
}

@media(max-width:430px){

    .side-head{
        padding:13px 14px;
    }

    .me-card{
        padding:14px;
    }

    .search{
        margin-left:12px;
        margin-right:12px;
    }

    .user-item{
        padding:11px 8px;
    }

    .typing{
        padding-left:15px;
    }

    .chat-user b{
        font-size:14px;
    }

    .chat-user small{
        font-size:11px;
    }

    .msg{
        max-width:92%;
    }
}
/* FIX: MESSAGE INPUT ALWAYS VISIBLE */

.chat-pane{
    height:100vh !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-rows:74px 25px minmax(0,1fr) 76px !important;
}

.messages{
    min-height:0 !important;
    overflow-y:auto !important;
}

.composer{
    display:flex !important;
    min-height:76px !important;
    height:76px !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative !important;
    z-index:5 !important;
}

.composer textarea{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    min-height:48px !important;
    height:48px !important;
}

.send-btn{
    display:grid !important;
    visibility:visible !important;
}

@media(max-width:760px){
    .chat-pane{
        height:100dvh !important;
        grid-template-rows:68px 24px minmax(0,1fr) 70px !important;
    }

    .composer{
        height:70px !important;
        min-height:70px !important;
    }

    .composer textarea{
        height:43px !important;
        min-height:43px !important;
    }
}/* =========================
   VIP MESSAGE COMPOSER
========================= */

.composer{
    padding:12px 16px !important;
    gap:9px !important;
    background:rgba(255,255,255,.96) !important;
    backdrop-filter:blur(12px);
}

.composer textarea{
    min-height:48px !important;
    height:48px;
    border:1px solid #d5e3eb !important;
    border-radius:18px !important;
    background:#f7fafc !important;
    padding:12px 16px !important;
    font-size:14px;
    line-height:22px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.composer textarea::placeholder{
    color:#8ba0af;
}

.composer textarea:focus{
    background:#fff !important;
    border-color:#1296d3 !important;
    box-shadow:
        0 0 0 3px #1296d318,
        0 5px 18px #16445c0d !important;
}

.composer .icon-btn{
    width:44px;
    height:44px;
    border-radius:14px;
    background:#eef6fa;
    transition:all .18s ease;
}

.composer .icon-btn:hover{
    background:#dceff7;
    transform:translateY(-2px);
}

.composer .send-btn{
    width:48px;
    height:48px;
    border-radius:16px;
    background:linear-gradient(
        135deg,
        #119bd8,
        #075084
    );
    box-shadow:
        0 7px 18px #07508430;
    transition:all .18s ease;
}

.composer .send-btn:hover{
    transform:translateY(-2px) scale(1.03);
    box-shadow:
        0 10px 24px #07508440;
}

.composer .send-btn:active{
    transform:scale(.92);
}

@media(max-width:760px){

    .composer{
        padding:9px 10px !important;
    }

    .composer textarea{
        height:44px;
        min-height:44px !important;
        border-radius:16px !important;
    }

    .composer .icon-btn{
        width:39px;
        height:39px;
    }

    .composer .send-btn{
        width:44px;
        height:44px;
        border-radius:14px;
    }
}
/* =========================
   VIP PROFILE PICTURE
========================= */

.profile-picture-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:20px;
    margin-bottom:8px;
    border:1px solid #dce8ef;
    border-radius:20px;
    background:linear-gradient(
        145deg,
        #f8fcff,
        #edf6fb
    );
}

.profile-picture-preview{
    width:100px;
    height:100px;
    border-radius:50%;
    display:grid;
    place-items:center;
    overflow:hidden;
    background:#e5f4fc;
    color:#12699c;
    font-size:42px;
    font-weight:800;
    border:4px solid #fff;
    box-shadow:
        0 8px 25px rgba(20,80,120,.15);
}

.profile-picture-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.avatar-upload-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    padding:10px 16px;
    border-radius:12px;
    background:#e8f5fb;
    color:#075884;
    font-weight:800;
    cursor:pointer;
    transition:.2s ease;
}

.avatar-upload-btn:hover{
    background:#d7edf7;
    transform:translateY(-1px);
}

.avatar-help{
    color:#7b92a3;
    font-size:11px;
}
/* =========================
   VIP PROFILE PICTURE
========================= */

.profile-picture-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:20px;
    margin-bottom:8px;
    border:1px solid #dce8ef;
    border-radius:20px;
    background:linear-gradient(
        145deg,
        #f8fcff,
        #edf6fb
    );
}

.profile-picture-preview{
    width:100px;
    height:100px;
    border-radius:50%;
    display:grid;
    place-items:center;
    overflow:hidden;
    background:#e5f4fc;
    color:#12699c;
    font-size:42px;
    font-weight:800;
    border:4px solid #fff;
    box-shadow:
        0 8px 25px rgba(20,80,120,.15);
}

.profile-picture-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.avatar-upload-btn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    padding:10px 16px;
    border-radius:12px;
    background:#e8f5fb;
    color:#075884;
    font-weight:800;
    cursor:pointer;
    transition:.2s ease;
}

.avatar-upload-btn:hover{
    background:#d7edf7;
    transform:translateY(-1px);
}

.avatar-help{
    color:#7b92a3;
    font-size:11px;
}

/* =========================
   SCREENSHOT UI FINISH
========================= */

.side-head{
    height:56px;
    padding:8px 18px;
}

.chat-pane{
    grid-template-rows:56px 25px minmax(0,1fr) 76px !important;
}

.chat-head{
    height:56px;
    padding:7px 20px;
}

.chat-head .call-actions{
    align-items:center;
    gap:14px;
}

.chat-head .call-actions .icon-btn{
    width:34px;
    height:42px;
    padding:0;
    border-radius:8px;
    background:transparent;
    color:#050505;
    box-shadow:none;
    font-size:0;
}

.chat-head .call-actions .icon-btn:hover{
    background:#f1f5f7;
    transform:none;
}

.chat-head .call-actions svg{
    width:29px;
    height:29px;
    display:block;
    fill:currentColor;
    stroke:currentColor;
    stroke-width:0;
}

.chat-head .call-actions .more-dots{
    display:block;
    font-size:34px;
    line-height:1;
    font-weight:900;
    transform:translateY(-2px);
}

.composer{
    height:76px !important;
    min-height:76px !important;
    padding:10px 18px !important;
    background:#fff !important;
    box-shadow:none !important;
}

.composer .icon-btn{
    background:transparent !important;
    color:#050505 !important;
    width:48px;
    height:48px;
    border-radius:10px;
    box-shadow:none !important;
}

.composer .icon-btn:hover{
    background:#f3f6f8 !important;
    transform:none;
}

.composer .icon-btn svg{
    width:43px;
    height:43px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.composer textarea{
    border:0 !important;
    background:#fff !important;
    box-shadow:none !important;
    font-size:15px;
}

.composer textarea:focus{
    border:0 !important;
    box-shadow:none !important;
}

.composer .send-btn{
    width:58px !important;
    height:58px !important;
    border-radius:50% !important;
    background:transparent !important;
    color:#050505 !important;
    box-shadow:none !important;
    font-size:0;
}

.composer .send-btn svg{
    width:58px;
    height:58px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

@media(max-width:760px){
    .chat-pane{
        grid-template-rows:68px 24px minmax(0,1fr) 70px !important;
    }

    .chat-head{
        height:68px;
        padding:10px 12px;
    }

    .chat-head .call-actions{
        gap:4px;
    }

    .chat-head .call-actions .icon-btn{
        width:38px;
        height:38px;
    }

    .composer{
        height:70px !important;
        min-height:70px !important;
        padding:9px 10px !important;
    }

    .composer .icon-btn{
        width:39px;
        height:39px;
    }

    .composer .send-btn{
        width:44px !important;
        height:44px !important;
    }

    .composer .send-btn svg{
        width:44px;
        height:44px;
    }
}

/* =========================================================
   WHATSAPP-WEB INSPIRED CHAT LAYOUT
   (OWN CHAT branding and existing functionality preserved)
========================================================= */
:root{
  --wa-green:#128c7e;
  --wa-green-dark:#075e54;
  --wa-teal:#25d366;
  --wa-chat:#efeae2;
  --wa-search:#f0f2f5;
  --wa-border:#e6e6e6;
}

.chat-bg{background:#d1d7db}
.app-shell{
  grid-template-columns:360px minmax(0,1fr);
  background:#fff;
  max-width:1600px;
  margin:0 auto;
  box-shadow:0 0 28px rgba(0,0,0,.10);
}
.sidebar{background:#fff;border-right:1px solid var(--wa-border);box-shadow:none}
.side-head{height:60px;padding:9px 16px;background:#f0f2f5;border-bottom:1px solid #ddd}
.brand-mark.small{width:40px;height:40px}
.mini-brand{font-size:20px}
.me-card{padding:10px 16px;background:#fff}
.me-card .avatar{width:40px;height:40px}
.search{margin:7px 12px 9px;background:#f0f2f5;border:0;border-radius:9px;padding:7px 12px}
.search input{font-size:14px}
.user-list{padding:0;}
.user-item{margin:0;border-left:0;border-radius:0;padding:11px 16px;border-bottom:1px solid #f0f0f0;gap:12px}
.user-item:hover{background:#f5f6f6}
.user-item.active{background:#e9edef;border-left:0}
.user-item.active:before{content:"";position:absolute}
.user-main b{font-size:15px;color:#111b21}
.user-main small{font-size:12px;color:#667781}
.side-bottom{padding:10px 12px;background:#f0f2f5}
.side-bottom .ghost{border-radius:8px;padding:10px 14px;background:#fff}

.chat-pane{
  grid-template-rows:60px 22px minmax(0,1fr) 70px !important;
  background:var(--wa-chat);
}
.chat-head{
  height:60px;
  padding:8px 16px;
  gap:11px;
  background:#f0f2f5;
  border-bottom:1px solid #d9dde0;
  box-shadow:none;
}
.chat-head .avatar{width:40px;height:40px}
.chat-user b{font-size:15px;color:#111b21}
.chat-user small{font-size:12px;color:#667781}
.call-actions{gap:2px}
.call-actions .icon-btn,.chat-head .icon-btn{
  width:40px;height:40px;border-radius:50%;
  background:transparent;color:#54656f;
}
.call-actions .icon-btn:hover,.chat-head .icon-btn:hover{background:#e2e6e8;transform:none}
.more-dots{font-size:27px;line-height:1}
.typing{background:#efeae2;color:#128c7e;padding:2px 20px;min-height:22px}

.messages{
  padding:24px 7%;
  gap:4px;
  background-color:var(--wa-chat);
  background-image:
    radial-gradient(rgba(80,70,55,.075) 1px,transparent 1px),
    radial-gradient(rgba(80,70,55,.045) 1px,transparent 1px);
  background-position:0 0,14px 14px;
  background-size:28px 28px;
}
.msg{
  max-width:min(65%,600px);
  padding:7px 9px 5px;
  border:0;
  border-radius:8px;
  background:#fff;
  box-shadow:0 1px 1px rgba(0,0,0,.10);
  color:#111b21;
  line-height:1.35;
}
.msg:not(.mine){border-bottom-left-radius:2px}
.msg.mine{
  background:#d9fdd3;
  border:0;
  color:#111b21;
  border-bottom-right-radius:2px;
}
.msg img{border-radius:7px;max-height:420px;margin:-1px -2px 2px}
.msg audio{min-width:240px}
.msg .meta{font-size:10px;color:#667781;margin-top:3px}
.msg.mine .meta{color:#667781}
.msg.deleted{background:#f5f5f5;color:#8696a0}
.file-link{color:#128c7e;padding:7px 4px}
.empty-state{color:#667781}
.empty-icon{background:#dfe8eb;box-shadow:none}
.empty-state h2{color:#41525d}

.composer{
  min-height:70px !important;
  height:70px !important;
  padding:9px 16px !important;
  gap:7px;
  background:#f0f2f5;
  border-top:1px solid #d9dde0;
  box-shadow:none;
}
.composer .icon-btn,.composer .attach{
  width:42px;height:42px;border-radius:50%;
  background:transparent;color:#54656f;
}
.composer .icon-btn:hover,.composer .attach:hover{background:#e2e6e8;transform:none}
.composer textarea{
  min-height:42px !important;
  height:42px !important;
  border:0;
  border-radius:21px;
  background:#fff;
  padding:10px 16px;
  box-shadow:none;
}
.composer textarea:focus{box-shadow:none;border:0}
.send-btn{
  width:44px;height:44px;border-radius:50%;
  background:var(--wa-green);
  box-shadow:none;
}
.send-btn:hover{background:var(--wa-green-dark);transform:none;box-shadow:none}

/* cleaner call window */
.call-card{border-radius:12px}

@media(max-width:900px){
  .app-shell{grid-template-columns:320px minmax(0,1fr)}
  .messages{padding-left:5%;padding-right:5%}
  .msg{max-width:72%}
}

@media(max-width:760px){
  .chat-pane{grid-template-rows:60px 22px minmax(0,1fr) 62px !important}
  .chat-head{height:60px;padding:7px 8px}
  .chat-head .avatar{width:40px;height:40px}
  .call-actions .icon-btn{width:38px;height:38px}
  .messages{padding:14px 8px}
  .msg{max-width:88%;padding:7px 8px 5px}
  .composer{height:62px !important;min-height:62px !important;padding:7px 7px !important}
  .composer .icon-btn,.composer .attach{width:38px;height:38px}
  .composer textarea{height:40px !important;min-height:40px !important;border-radius:20px;padding:9px 13px}
  .send-btn{width:40px;height:40px}
}


/* =========================================================
   FINAL MOBILE / CHAT FIXES
   - No emoji picker/button in the composer
   - WhatsApp-like compact mobile layout
   - Proper 100dvh chat sizing and safe-area padding
   - Custom three-dot menu instead of browser prompt
========================================================= */
.emoji-picker,
#emojiPicker,
#emojiBtn { display:none !important; }

.chat-menu{
  position:absolute;
  top:58px;
  right:12px;
  z-index:80;
  min-width:190px;
  padding:6px 0;
  background:#fff;
  border:1px solid #e1e5e8;
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.16);
}
.chat-menu.hidden{display:none !important}
.chat-menu button{
  display:block;
  width:100%;
  padding:11px 16px;
  border:0;
  background:#fff;
  text-align:left;
  font:inherit;
  color:#111b21;
  cursor:pointer;
}
.chat-menu button:hover{background:#f0f2f5}

.chat-pane{position:relative;min-width:0;width:100%;overflow:hidden}
.chat-head{position:relative;min-width:0}
.chat-user{min-width:0;flex:1;overflow:hidden}
.chat-user b,.chat-user small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.call-actions{flex:0 0 auto}
.messages{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.composer{flex:0 0 auto;min-width:0;padding-bottom:calc(8px + env(safe-area-inset-bottom)) !important}
.composer textarea{flex:1 1 auto;min-width:0;resize:none;overflow-y:auto}
.composer .icon-btn,.composer .attach,.composer .send-btn{flex:0 0 auto}

@media(max-width:760px){
  html,body{width:100%;height:100%;overflow:hidden}
  .app-shell{width:100vw;max-width:none;height:100dvh !important;min-height:100dvh !important}
  .chat-pane{width:100vw;height:100dvh !important;grid-template-rows:60px 22px minmax(0,1fr) 64px !important}
  .chat-head{height:60px;padding:6px 6px 6px 4px;gap:4px}
  .chat-head .avatar{width:38px;height:38px;flex:0 0 38px}
  .chat-head .mobile-only{width:36px;height:36px;flex:0 0 36px}
  .chat-user b{font-size:14px}
  .chat-user small{font-size:11px}
  .call-actions{gap:0}
  .call-actions .icon-btn{width:36px;height:36px;flex:0 0 36px}
  .messages{padding:10px 7px 14px;gap:5px}
  .msg{max-width:86%;padding:6px 8px 4px;border-radius:8px;font-size:14px}
  .msg img{max-width:100%;height:auto;max-height:55vh}
  .msg video{max-width:100% !important;height:auto}
  .msg audio{width:210px;max-width:100%;min-width:0}
  .msg .meta{font-size:9px}
  .composer{height:64px !important;min-height:64px !important;padding:5px 6px !important;gap:3px !important}
  .composer .icon-btn,.composer .attach{width:36px;height:36px;flex:0 0 36px}
  .composer textarea{height:38px !important;min-height:38px !important;max-height:90px;padding:8px 11px !important;border-radius:19px !important;font-size:14px}
  .composer .send-btn{width:38px;height:38px;flex:0 0 38px}
  .chat-menu{top:56px;right:7px;min-width:180px}
}

@media(max-width:360px){
  .chat-head .avatar{width:34px;height:34px;flex-basis:34px}
  .chat-head .mobile-only{width:32px;height:32px;flex-basis:32px}
  .call-actions .icon-btn{width:32px;height:32px;flex-basis:32px}
  .composer .icon-btn,.composer .attach{width:32px;height:32px;flex-basis:32px}
  .composer .send-btn{width:34px;height:34px;flex-basis:34px}
  .composer textarea{padding-left:9px !important;padding-right:9px !important}
}

/* =========================
   MESSAGE REACTIONS / ACTIONS
========================= */
.msg-content{overflow-wrap:anywhere;word-break:break-word}
.reaction-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.reaction-chip{border:1px solid #d8e4eb;background:#fff;border-radius:999px;padding:2px 7px;font-size:13px;line-height:20px;cursor:pointer;box-shadow:0 1px 3px #17344a12}
.reaction-chip:hover,.reaction-chip.mine-reaction{background:#eaf7ff;border-color:#7bc8ed}
.message-actions{position:fixed;inset:0;background:#061d2b55;backdrop-filter:blur(3px);display:grid;place-items:center;z-index:60;padding:18px}
.message-actions-card{width:min(420px,100%);background:#fff;border-radius:22px;padding:14px;box-shadow:0 24px 70px #082b4233}
.reaction-row{display:flex;justify-content:center;gap:7px;padding:8px 3px 14px;border-bottom:1px solid #e6edf2}
.reaction-row button{width:48px;height:48px;border:1px solid #e1e9ee;background:#f8fbfd;border-radius:50%;font-size:25px;transition:.15s ease}
.reaction-row button:hover{transform:scale(1.1);background:#eef8fd}
.message-action-buttons{display:grid;gap:7px;padding-top:10px}
.message-action-buttons button{border:0;background:#f1f5f7;border-radius:12px;padding:12px;font-weight:750;color:#29485e}
.message-action-buttons .danger-action{background:#fff0f1;color:#b22f3b}
.message-action-buttons .cancel-action{background:#e9f4fa;color:#0b5d92}
.settings-logout{margin-top:2px}

@media(max-width:760px){
  .message-actions{align-items:end;padding:10px}
  .message-actions-card{border-radius:22px 22px 14px 14px;padding-bottom:12px}
  .reaction-row button{width:44px;height:44px;font-size:22px}
  .reaction-chips{margin-top:4px}
  .msg{max-width:86%;padding:9px 11px}
}


.edited-label{font-size:.72em;opacity:.65;margin-left:4px;font-style:italic}.editing-message{outline:2px solid rgba(37,211,102,.25);border-radius:12px}.message-actions-card .hidden{display:none!important}
