*{
    margin: 0;
    box-sizing: border-box;
}
/* Login responsive */
.login {
    background: linear-gradient(255deg, #262f3f, #4e6169);
    min-height: 100vh; /* Chiếm full chiều cao màn hình */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login img {
    width: 50%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

@media (max-width: 768px) {
    .login .row {
        flex-direction: column-reverse;
        align-items: center;
    }
    .login .col {
        width: 100%;
        max-width: 400px;
        padding: 20px !important;
    }
    .login img {
        width: 70%;
        margin: 20px auto;
    }
}

/*Dashboard*/

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgb(26, 32, 44);
  padding: 0px 20px;
  border-bottom: 1px solid black;
  flex-wrap: wrap; /* Cho phép xuống hàng khi màn hình nhỏ */
}

.left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e0;
}

.left .logo {
  font-size: 23px;
  font-weight: bold;
}
.left p
{
    margin-top: 18px;
}
.right {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #a0aec0;
}

.right input {
  border: none;
  color:#bcd5e0;
  background-color: rgb(26, 32, 44);
  width: 60px;
  font-weight: bold;
  text-align: right;
}
.right input::placeholder
{
    color: #bcd5e0;
    opacity: 1;
}
.right input:focus {
  outline: none;
}
.main
{
    display: flex;
    background-color: rgb(26, 32, 44);
    height: 610px;

}
.main aside
{
    margin-left: 20px;
    padding-right: 20px;
    width: 19%;
}

.main aside nav button
{
    text-align:start;
    padding:10px 0 10px 10px;
    background-color:  rgb(26, 32, 44);
    border: none;
    color:#bcd5e0;
    width: 80%;
}
.main aside nav button:hover
{
    background-color:#2d3748;
    border-radius: 5px;
}
.simulator input[type=range]
{
    width: 100%;
}
.simulator button
{
    width: 45%;
    margin-left: 10px;
}
.seeds button
{
    width: 31%;
    color: #a0aec0;
    background-color: #2d3748;
    border-radius: 5px;
    border: none;
    margin-left: 6px;
}
.main section
{
    padding: 0;
    width: 78%;
}
.card
{
    display: flex;
    align-items: center;
    border-radius: 15px;
    background-color:#2d3748 ;
}
.card p
{
    margin:0;
}
.icon 
{
    border: 1px none ;
    background-color: rgb(26, 32, 44);
    padding: 5px;
    border-radius: 50%;
    margin:20px 5px 25px 0;
}
.info{
    margin-bottom: 0 !important;
}
.info p
{
    color: #a0aec0;
}
.info h4
{
    color:#cbd5e0;
}
.feed p
{
    color: #a0aec0;
    font-size: 17px;
}
.content .card
{
    align-items: normal;
    height: 450px;
}
.content p
{
    color: #bcd5e0;
    padding-left: 20px;
    font-weight: bold;
}
.dark-section .content h5 
{
    color: #bcd5e0;
    font-weight: bold;
}
.chart-wrap {
    background: #2d3748;
    border-radius: 12px;
    flex-direction: column;
    margin-left:15px;
    padding: 15px;
    color: #a0aec0;
    width: 90%;
    height: 100%;
}
.recent-ticket
{
    max-height: 350px;
    overflow-y: auto;
}
.recent-ticket p
{
    color: #a0aec0;
    font-size: 15px;
}
.recent-ticket .info
{
    border: 1px solid #a0aec0;
    border-radius: 5px;
    padding: 0 10px 0 10px;
    color: #bcd5e0;
    margin-top: 10px;
}
.info .sub-info span
{
    color: #a0aec0;
    font-size: 15px;
}

/* Tickets */
.ticket *
{
    font-size: 16px;
}
.nav-filter p
{
    font-weight: bold;
}
.nav-filter
{
    display:flex;
    justify-content: space-between;
    background-color: #2d3748;
    padding: 20px 0 5px 0;
    border-radius: 10px;
    margin: 15px;
}
.nav-filter p
{
    color: #bcd5e0;
    margin-left: 15px;
}
.search input
{
    background-color: #2d3748;
    border-radius: 5px;
    border: 0.5px solid #bcd5e0;
}
.ticket-filter
{
    display: flex;
    padding-right:20px;
    margin: 0;
}
.ticket-filter button
{
    width: 100px;
    margin-left: 10px;
    border-radius: 5px;
    background-color: #4a5568;
    color: #bcd5e0;
    border: none;
}
.priority,
.status
{
    border: 1px solid #bcd5e0;
    padding:0 5px 0 5px;
    border-radius: 5px;
    height: 30px;
    color: #bcd5e0;
    margin-left: 10px;
    width: auto;
}
.priority select,
.status select
{
    background-color: #2d3748;
    border: none;
    color: #bcd5e0;
}
.priority select
{
    width: 45%;
}
.status select
{
    width: 60%;
}
.tbl-ticket
{
    background-color: #2d3748;
    color: #bcd5e0;
    padding:10px 15px 10px 15px;
    border-radius: 10px;
    margin: 0 15px 0 15px;
    height: 500px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}
.tbl-head
{
    background-color:#4a5568 ;
    font-weight: bold;
    height:30%;
}
.tbl-ticket input
{
    background-color: #4a5568;
    color: #bcd5e0;
    border: none;
    border-radius: 5px;
    padding:0 10px 0 10px;
}
.tbl-content
{
    border-bottom: 1px solid #bcd5e0;
    height:40px;
}
/*Feedback*/
.feedback
{
    background-color: #2d3748;
    color: #bcd5e0;
    padding: 10px;
    margin-left: 10px;
    margin-top: 10px;
    border-radius: 10px;
    height: 570px;

}
.feedback p
{
    font-weight: bold;
    padding:10px 0 0 15px ;
}
.tbl-head-fb
{
    background-color: #4a5568;
    font-weight: bold;
}
table{
    margin-left: 10px;
}
.tbl-content{
    border-bottom: 1px solid #a0aec0;
}
.feedback .chart-wrap {
    background: #2d3748;
    border-radius: 12px;
    width: 350px;
    border: 3px solid #262f3f;
    box-shadow: 1px 3px #2d3748;
}
.feedback .chart-wrap h4 {
    margin-bottom: 20px;
    color: #bcd5e0;
}
.avg-csat {
    margin-top: 15px;
    font-size: 14px;
    color: #cbd5e0;
}
/* KPI */
.KPI{
    background-color: #2d3748;
    color: #bcd5e0;
    padding: 10px;
    margin-left: 10px;
    margin-top: 10px;
    border-radius: 10px;
    height: 570px;
}
.KPI .chart-wrap
{
    width: 100%;
}
.KPI p 
{
    font-weight: bold;
    padding-left: 15px;
}
.KPI .tbl-head-kpi
{
    background-color: #4a5568;
    font-weight: bold;
}
/*Chat*/
.chat 
{
    background-color: #2d3748;
    border-radius: 20px;
    padding:15px 10px 0 10px;
    color: #bcd5e0;
    height: 600px;
}
.chat-tickets
{
    border-right: 1px solid #bcd5e0;
}
.chat-list
{
    max-height: 500px;
    overflow-y: auto;
}
.chat-item
{
    display: flex;
    border-bottom:1px solid #bcd5e0;
    background-color: transparent;
    border-radius: 15px;
    padding:10px 15px;
    justify-content: space-between;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.chat-item:focus
{
    background-color:#4a5568 ;
}
.chat-item :is(h6,p)
{
    margin-bottom: 5px;
}
.chat-item p
{
    font-size: 12px;
}
.dot-status
{
    display: flex;
    width: 100px;
}
.dot-status p
{
    font-size: 12px;
}
.chat-content
{
    width: 97%;
    height: 240px;
    border: 1px solid #4a5568;
    border-radius: 15px;
    margin-bottom: 10px;
}
.chat-input input
{
    background-color: transparent;
    border: 1px solid #4a5568;
    height: 40px;
    border-radius: 10px;
    width: 88%;
}
.chat-input button
{
    background-color: #4E71FF;
    color: #bcd5e0;
    height: 40px;
    width: 9%;
    border: none;
    border-radius: 10px;
    margin-left: 5px;
}
/* schedule */
.schedule
{
    background-color: #2d3748;
    color: #bcd5e0;
    padding: 10px;
    margin-left: 10px;
    margin-top: 10px;
    border-radius: 10px;

}
.tbl-schedule
{
    display: flex;
    justify-content: center;
}
.tbl-schedule table tbody
{
    border-radius: 15px;
}
/*Footer*/
footer
{
    text-align: center;
    color: #bcd5e0;
    background-color: rgb(26, 32, 44)    ;
}

/*================ Media Queries Responsive =================*/

/* Large desktop / màn hình rộng */
@media (max-width: 1400px) {
    .main aside { width: 20%; }
    .main section { width: 77%; }
}

/* Desktop nhỏ / Tablet landscape */
@media (max-width: 1200px) {
    .main aside { width: 22%; margin-left: 10px; padding-right: 10px; }
    .main section { width: 75%; padding: 0 10px; }
}

/* Tablet / Laptop nhỏ */
@media (max-width: 992px) {
    .main {
        flex-direction: column; /* Aside + Section xếp dọc */
        height: auto;
    }
    .main aside,
    .main section {
        width: 100%;
        margin: 0;
        padding: 10px 0;
    }
    .ticket-filter button,
    .seeds button,
    .simulator button {
        width: 100%; /* Nút full width trên tablet */
        margin: 5px 0;
    }
    .tbl-ticket { height: 400px; }
    .feedback, .KPI, .chat, .schedule { height: auto; }
}

/* Mobile */
@media (max-width: 768px) {
    .left .logo { font-size: 20px; }
    .left p { margin-top: 10px; }
    .right input { width: 50px; }
    .feed p, .ticket *, .tbl-ticket p, .tbl-head p, .avg-csat {
        font-size: 14px;
    }
    .chat-input input { width: 80%; }
    .chat-input button { width: 18%; }
    .card, .content .card { flex-direction: column; height: auto; }
    .chart-wrap { width: 100%; }
    .recent-ticket { max-height: 250px; }
}

/* Small mobile / điện thoại */
@media (max-width: 576px) {
    .login img { width: 90%; max-width: 150px; }
    .left .logo { font-size: 18px; }
    .main aside nav button { font-size: 14px; width: 100%; margin-bottom: 5px; }
    .priority select, .status select { width: 100%; margin-top: 5px; }
    .tbl-ticket { padding: 5px; font-size: 12px; }
    .chat-content { width: 100%; height: 200px; }
    .chat-list { max-height: 300px; }
    .feedback .chart-wrap, .KPI .chart-wrap { width: 100%; }
}
/*================ Responsive Menu Mobile =================*/
@media (max-width: 768px) {
    /* Menu ngang */
    .main aside {
        width: 100%;
        margin: 0;
        padding: 0;
        order: 1; /* hiển thị trên top nếu muốn */
    }

    .main aside nav {
        display: flex;
        justify-content: space-around; /* nút trải đều */
        flex-wrap: wrap; /* xuống hàng nếu quá nhiều */
        padding: 10px 0;
        background-color: #262f3f; /* màu menu */
        border-radius: 10px;
    }

    .main aside nav button {
        width: auto;
        flex: 1 1 auto;
        text-align: center;
        margin: 5px;
        padding: 10px 0;
        font-size: 14px;
    }

    /* Nội dung chính section xuống dưới menu */
    .main section {
        width: 100%;
        padding: 10px;
        order: 2;
    }

    /* Các nút khác cũng co dãn */
    .ticket-filter button,
    .seeds button,
    .simulator button {
        width: 100%;
        margin: 5px 0;
    }
}
/* Responsive Ticket Filter */
@media (max-width: 768px) {
    .ticket-filter {
    display: flex;
    align-items: center;
    gap: 10px; /* khoảng cách giữa các phần tử */
    flex-wrap: wrap; /* nếu quá nhỏ thì xuống dòng */
}

/* Priority + Status nằm ngang label + select */
.priority,
.status {
    display: flex;
    align-items: center;
    gap: 5px; /* khoảng cách giữa label và select */
}

/* Select full width trong từng block */
.priority select,
.status select {
    width: 120px; /* hoặc auto tùy ý */
}

/* Nút Filter */
.ticket-filter button {
    height: 35px;
}

}
/* Áp dụng cho tất cả scrollbars */
::-webkit-scrollbar {
  width: 6px;
}

/* Track (nền) */
::-webkit-scrollbar-track {
  background: #e6e6e6;
  border-radius: 10px;
}

/* Thanh kéo */
::-webkit-scrollbar-thumb {
  background: #b3b3b3;
  border-radius: 10px;
}

/* Hover đẹp hơn */
::-webkit-scrollbar-thumb:hover {
  background: #999;
}
