
/* ===================================================
   TRỢ LÝ HÀNH CHÍNH CÔNG AN NHƠN V3
   style.css
=================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --primary:#0b5cab;
    --primary-hover:#084b8f;
    --bg:#eef3f8;
    --surface:#ffffff;
    --border:#e5e7eb;
    --text:#1f2937;
    --muted:#6b7280;
    --shadow:0 8px 24px rgba(15,23,42,.08);
}

html,body{
    width:100%;
    height:100%;
    font-family:"Be Vietnam Pro",sans-serif;
    background:var(--bg);
    color:var(--text);
}

body{
    display:flex;
    justify-content:center;
    align-items:center;
}

.app{
    width:100%;
    max-width:460px;
    height:100vh;
    background:var(--surface);
    display:flex;
    flex-direction:column;
    box-shadow:var(--shadow);
}

.header{
    background:var(--primary);
    color:#fff;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 18px;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo{
    width:50px;
    height:50px;
    border-radius:14px;
    background:#fff;
    color:var(--primary);
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:26px;
}

.brand-text h1{
    font-size:20px;
    font-weight:700;
}

.brand-text span{
    display:block;
    margin-top:3px;
    font-size:13px;
    opacity:.9;
}

.system-status{
    display:flex;
    align-items:center;
    gap:8px;
    background:rgba(255,255,255,.14);
    border-radius:999px;
    padding:8px 12px;
    font-size:13px;
}

.status-dot{
    width:9px;
    height:9px;
    background:#22c55e;
    border-radius:50%;
}

.chat{
    flex:1;
    overflow-y:auto;
    background:#f8fafc;
    padding:22px 16px;
}

#messages{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.message{
    display:flex;
    gap:10px;
    align-items:flex-start;
}

.message.user{
    justify-content:flex-end;
}

.message.user .avatar{
    order:2;
    background:var(--primary);
    color:#fff;
}

.message.user .bubble{
    background:var(--primary);
    color:#fff;
}

.avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#dbeafe;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink:0;
    font-weight:700;
}

.bubble{
    max-width:82%;
    background:#fff;
    border-radius:18px;
    padding:16px 18px;
    box-shadow:0 4px 14px rgba(0,0,0,.05);
    line-height:1.8;
    font-size:15px;
}

.bubble h2{
    color:var(--primary);
    margin-bottom:10px;
    font-size:20px;
}

.bubble p{
    margin-bottom:10px;
}

.bubble p:last-child{
    margin-bottom:0;
}

.footer{
    display:flex;
    gap:10px;
    padding:16px;
    border-top:1px solid var(--border);
    background:#fff;
}

.footer textarea{
    flex:1;
    min-height:56px;
    max-height:180px;
    resize:none;
    border:none;
    outline:none;
    border-radius:16px;
    background:#f3f4f6;
    padding:15px 16px;
    font:inherit;
}

.footer textarea::placeholder{
    color:#9ca3af;
}

.footer button{
    width:56px;
    border:none;
    border-radius:16px;
    background:var(--primary);
    color:#fff;
    font-size:22px;
    cursor:pointer;
    transition:.2s;
}

.footer button:hover{
    background:var(--primary-hover);
    transform:translateY(-2px);
}

.chat::-webkit-scrollbar{
    width:8px;
}
.chat::-webkit-scrollbar-thumb{
    background:#cbd5e1;
    border-radius:999px;
}

@media (max-width:768px){
    .app{
        max-width:100%;
        box-shadow:none;
    }
    .bubble{
        max-width:88%;
    }
}
