*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: Arial, sans-serif;
}

body{
    background:#f7f8ff;
    color:#222;
}

/* APP LAYOUT */

.app-shell{
    display:grid;
    grid-template-columns:
        320px
        1fr
        300px;
    height:100vh;
    background:#f7f8ff;
}

/* SIDEBAR */

.sidebar{
    background:#fff;
    border-right:1px solid #eee;
    padding:20px;
    overflow-y:auto;
}

.sidebar-top{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:20px;
}

.profile-mini img{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:cover;
}

.search-box input{
    background:#f4f5fb;
    border:none;
    margin-bottom:20px;
}

.chat-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.chat-item{
    display:flex;
    gap:12px;
    padding:12px;
    border-radius:18px;
    text-decoration:none;
    color:#222;
    transition:.2s;
}

.chat-item:hover{
    background:#f3f1ff;
}

.avatar{
    width:48px;
    height:48px;
    border-radius:50%;
    object-fit:cover;
}

.chat-meta{
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.chat-meta small{
    color:#888;
}

/* CENTER PANEL */

.chat-panel{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:30px;
}

.chat-empty{
    text-align:center;
}

.chat-empty-icon{
    font-size:64px;
    margin-bottom:20px;
}

/* RIGHT PANEL */

.details-panel{
    background:#fff;
    border-left:1px solid #eee;
    padding:20px;
}

.details-card{
    background:#f7f8ff;
    padding:20px;
    border-radius:24px;
}

/* MOBILE */

@media(max-width:900px){

    .app-shell{
        grid-template-columns:1fr;
    }

    .details-panel{
        display:none;
    }

    .chat-panel{
        display:none;
    }

    .sidebar{
        border:none;
    }
}

.auth-page{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
}

.card{
    background:white;
    padding:30px;
    border-radius:24px;
    box-shadow:0 10px 30px rgba(0,0,0,.05);
    width:400px;
}

input{
    width:100%;
    padding:14px;
    border-radius:14px;
    border:1px solid #ddd;
    margin-bottom:15px;
}

button{
    width:100%;
    padding:14px;
    border:none;
    border-radius:14px;
    background:#6c63ff;
    color:white;
    cursor:pointer;
}
.auth-container{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
}

.auth-card{
    width:420px;
}

.auth-card h2{
    margin-bottom:8px;
}

.auth-card p{
    color:#666;
    margin-bottom:20px;
}

.auth-link{
    margin-top:20px;
    text-align:center;
}

.auth-link a{
    color:#6c63ff;
    text-decoration:none;
}

#response{
    margin-top:20px;
    color:green;
}
\#verifyResponse{
    margin-top:20px;
    color:green;
    text-align:center;
}
#loginResponse,
#forgotResponse,
#resetResponse{
    margin-top:20px;
    color:green;
    text-align:center;
}
.private-chat-shell{
    height:100vh;
    display:flex;
    flex-direction:column;
    background:#f7f8ff;
}

.chat-header{
    background:white;
    padding:20px;
    display:flex;
    gap:15px;
    align-items:center;
    border-bottom:1px solid #eee;
}

.messages-box{
    flex:1;
    overflow-y:auto;
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.msg{
    max-width:70%;
    padding:12px 16px;
    border-radius:20px;
}

.mine{
    align-self:flex-end;
    background:#6c63ff;
    color:white;
}

.theirs{
    align-self:flex-start;
    background:white;
}

.send-box{
    display:flex;
    gap:10px;
    padding:20px;
    background:white;
}

.send-box input{
    flex:1;
    margin:0;
}

.msg-actions{
    margin-top:8px;
    display:flex;
    gap:8px;
    font-size:12px;
}

.msg-actions a{
    color:inherit;
    text-decoration:none;
}

.chat-img{
    max-width:220px;
    border-radius:16px;
    display:block;
}

audio{
    max-width:220px;
}

.send-box button{
    width:auto;
    padding:12px 16px;
}
.avatar-wrap{
    position:relative;
}

.online-dot{
    position:absolute;
    right:2px;
    bottom:2px;
    width:12px;
    height:12px;
    border-radius:50%;
    background:#21c45d;
    border:2px solid white;
}

.chat-top-row,
.chat-bottom-row{
    display:flex;
    justify-content:space-between;
    gap:8px;
}

.preview{
    color:#888;
    max-width:170px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.badge{
    min-width:20px;
    height:20px;
    padding:0 6px;
    border-radius:20px;
    background:#6c63ff;
    color:white;
    font-size:11px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.status-strip{
    display:flex;
    gap:12px;
    overflow-x:auto;
    margin-bottom:20px;
    padding-bottom:10px;
}

.status-item{
    text-decoration:none;
    color:#222;
    font-size:12px;
    text-align:center;
    min-width:70px;
}

.status-avatar{
    width:56px;
    height:56px;
    border-radius:50%;
    border:3px solid #6c63ff;
    object-fit:cover;
    margin-bottom:6px;
}

.status-viewer{
    height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    background:black;
    color:white;
}

.status-text{
    font-size:32px;
    padding:40px;
}

.status-media{
    max-width:90%;
    max-height:90vh;
}