* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.8)), 
                url('../img/bg.png') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 95%;
    height: 95vh;
    border: 1px solid rgba(155, 155, 155, 0.5);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 100px 1fr;
    gap: 0px;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    grid-row: 1 / 3;
    background: linear-gradient(180deg, #0f3d3e, #1c7c7d);
    padding: 20px;
    overflow-y: auto;
}

.logo img { width: 120px; display: block; margin: 0 auto 30px; }

.line-divider {
    padding: 12px; color: white; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold; border-left: 3px solid #46dbc7;
    margin-top: 15px; border-radius: 0 8px 8px 0; user-select: none;
}

.sidebar ul { list-style: none; display: none; padding-left: 10px; }
.sidebar ul.show { display: block; }

.sidebar a {
    color: rgba(255, 255, 255, 0.8); text-decoration: none;
    display: flex; align-items: center; gap: 10px;
    padding: 10px; transition: 0.3s; font-size: 14px;
}

.sidebar a:hover, li.active a { color: white; background: rgba(255,255,255,0.1); border-radius: 8px; }

/* --- Header Section --- */
.header-content {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr auto auto; 
    align-items: center; 
    gap: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 0 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-title { font-size: 18px; color: #0f3d3e; }
.welcome-text { color: #1a5d1a; font-size: 12px; font-weight: 600; }

.profile-img { display: flex; align-items: center; gap: 12px; }
.profile-img img {
    width: 40px; height: 40px; border-radius: 50%; border: 2px solid #1a5d1a;
}

/* --- Main Content --- */
.main-content { padding: 30px; overflow-y: auto; background: #f8f9fa; }

.section-title { margin-bottom: 20px; font-size: 18px; color: #333; display: flex; align-items: center; gap: 10px; }

/* --- Bot Analytics (Success Rate & Top Questions) --- */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}

.stat-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 8px solid #1c7c7d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    font-size: 20px;
    font-weight: bold;
    color: #1c7c7d;
}

.top-questions-list {
    list-style: none;
    margin-top: 15px;
    text-align: left;
}

.top-questions-list li {
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.count-tag {
    background: #1c7c7d;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* --- Live Support Grid --- */
.chat-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    height: 500px;
}

.active-chats-list {
    background: white;
    border-radius: 15px;
    overflow-y: auto;
    border: 1px solid #eee;
}

.chat-item {
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: 0.3s;
}

.chat-item:hover { background: #f0f7f7; }

.chat-item.flagged { 
    border-left: 4px solid #d32f2f; 
    background: #fff8f8; 
}

/* Chat Window Section */
.chat-window {
    background: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.message.bot { 
    background: #e0e0e0; 
    color: #333;
    align-self: flex-start; 
    border-bottom-left-radius: 2px;
}

.message.user { 
    background: #1c7c7d; 
    color: white; 
    align-self: flex-end; 
    border-bottom-right-radius: 2px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* Shared Components */
.btn-train {
    background: #1c7c7d; 
    color: white;
    border: none; 
    border-radius: 8px;
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s;
}

.btn-train:hover { background: #0f3d3e; }

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #1c7c7d; border-radius: 10px; }

