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

body{
    font-family:Arial, sans-serif;
    background:#f5f6fa;
}

/* NAVBAR */

.custom-navbar{
    background:white;
    height:70px;
    border-bottom:1px solid #ddd;
}

.logo{
    font-size:30px;
    font-weight:bold;
    color: wheat;
    text-decoration:none;
}

.logo span{
    color:orange;
}

.nav-links a{
    text-decoration:none;
    color:#555;
    font-weight:500;
}

.dashboard-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f1f5f9;
    height: 100vh; 
    overflow: visible; 
}

.left-section {
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    overflow-y: auto; 
    padding-right: 10px;
}

.left-section::-webkit-scrollbar {
    width: 6px;
}
.left-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.chat-section {
    flex: 0 0 50%;
    max-width: 50%;
    height: calc(100vh - 40px); 
    background: #fff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.page-title {
    font-size: 25px;
    margin-bottom: 20px;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-bottom:20px;
}

.stat-card{
    background:white;
    padding:12px;
    border-radius:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
}

.stat-card h5{
    color:gray;
    margin-bottom:10px;
}

.stat-card h2{
    font-size:30px;
}

.chart-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:20px;
}
.chart-card{
    background:white;
    padding:25px;
    border-radius:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.05);
    min-height:420px;
}

.chart-card canvas{
    width:100% !important;
    height:320px !important;
}

.fake-chart{
    height:300px;
    display:flex;
    align-items:flex-end;
    gap:30px;
    padding:20px;
}

.bar{
    width:70px;
    background:#2563eb;
    border-radius:10px 10px 0 0;
}

.bar1{
    height:170px;
}

.bar2{
    height:250px;
}

.bar3{
    height:40px;
}

.bar4{
    height:30px;
}

.pie{
    width:250px;
    height:250px;
    margin:auto;
    border-radius:50%;

    background:
    conic-gradient(
        #2563eb 0% 15%,
        #2ec48d 15% 85%,
        #f5b400 85% 100%
    );
}
.chat-section{
    width:100%;
    height:90vh;
    background:#f5f7fb;
    border-radius:20px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,0.1);
}
.chat-header{
    padding:18px 25px;
    background:#1e293b;
    color:white;
    font-size:20px;
    font-weight:600;
}
.chat-box{
    flex:1;
    padding:20px;
    overflow-y:auto;
}

.message{
    display:flex;
    margin-bottom:18px;
    align-items:flex-start;
}

.message.user{
    justify-content:flex-end;
}

.message.bot{
    justify-content:flex-start;
}

.avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    margin-right:10px;
}

.bot .avatar{
    background:#2563eb;
    color:white;
}

.user .avatar{
    background:#111827;
    color:white;
    margin-left:10px;
    margin-right:0;
}

.bubble{
    max-width:70%;
    padding:14px 18px;
    border-radius:18px;
    line-height:1.6;
    font-size:15px;
}

.user .bubble{
    background:#2563eb;
    color:white;
    border-bottom-right-radius:5px;
}

.bot .bubble{
    background:white;
    color:#111827;
    border-bottom-left-radius:5px;
    box-shadow:0 3px 10px rgba(0,0,0,0.05);
}

.chat-input-area{
    display:flex;
    padding:15px;
    background:white;
    border-top:1px solid #ddd;
}

.chat-input-area input{
    flex:1;
    border:none;
    outline:none;
    padding:14px;
    border-radius:12px;
    background:#f1f5f9;
}

.chat-input-area button{
    width:55px;
    margin-left:10px;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:white;
    font-size:18px;
    cursor:pointer;
}

.typing{
    animation: blink 1s infinite;
}

@keyframes blink{
    0%{opacity:0.3;}
    50%{opacity:1;}
    100%{opacity:0.3;}
}

.suggestions{
    padding:10px 15px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.suggestions button{
    border:none;
    padding:8px 14px;
    border-radius:20px;
    background:white;
    cursor:pointer;
    box-shadow:0 2px 5px rgba(0,0,0,0.08);
}

.welcome-msg{
    text-align:center;
    margin-top:40px;
    color:#64748b;
}

.follow-up{
    margin-top:10px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.follow-up button{
    border:none;
    background:#e2e8f0;
    padding:8px 14px;
    border-radius:20px;
    cursor:pointer;
    transition:0.3s;
    font-size:14px;
}

.follow-up button:hover{
    background:#2563eb;
    color:white;
}

.stat-value {
    display: flex;
    align-items: center;
    justify-content: center; 
    gap: 10px;
}

.stat-value i {
    font-size: 1.5rem;
    color: #4A90E2;
}

.stat-value h3 {
    margin: 0;
}

.stat-card {
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 8px;
}

@media(max-width: 992px) {
    .dashboard-wrapper {
        flex-direction: column;
        height: auto; /* Allow natural scrolling on mobile */
        overflow: visible;
    }

    .left-section,
    .chat-section {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .left-section {
        height: auto;
        overflow: visible;
    }

    .chat-section {
        height: 80vh; /* Keep chat tall on mobile */
    }
}