body {
    margin: 0;
    background: #0f172a;
    color: #fff;
}

/* ===== HEADER ===== */
.header {
    height: 60px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-weight: bold;
	 position: relative;
    z-index: 1000;
}

/* ===== LAYOUT ===== */
.main {
    display: flex;
    height: calc(100vh - 60px);
}

/* ===== MENU LEFT ===== */
.sidebar {
    width: 250px;
    background: #1e293b;
    padding: 20px;
    border-right: 1px solid #334155;
}

/* ===== CONTENT ===== */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.menu-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
	font-weight: 500;
}

.menu-item:hover {
    background: #334155;
}

/* ===== CARD ===== */
.card {
    background: #1e293b;
    border: none;
    border-radius: 12px;
}

/* ===== LOGO ===== */
.logo img {
    height: 50px;
    object-fit: contain;
}

/* MOBILE */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        top: 60px;
        height: 100%;
        transition: 0.3s;
        z-index: 999;
    }

    .sidebar.show {
        left: 0;
    }
}
/* ===== MODAL ===== */
.modal-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    width: 300px;
}
/* submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.01s ease;

    /* ❌ bỏ hết cái này khi đóng */
    padding: 0;
    border: none;
    margin-bottom: 0;
}
.menu-item.active {
	background: #334155;
}
.submenu.show {
    max-height: 300px;

    background: #020617;
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.submenu-item {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;

    background: #020617; /* nền mặc định */
    color: #e2e8f0;

    transition: 0.5s;
}

.submenu-item:hover {
    background: #334155;
	font-weight: 700;
}
.submenu-item.active {
    background: #2563eb;
}
.sidebar .menu-item.active {
    background: #334155 !important;
    border-left: 3px solid #3b82f6;
}

/* SweetAlert2 custom theme */
.swal2-popup {
    background: #1e293b !important;
    color: #fff !important;
}

.swal2-title {
    color: #fff !important;
}

.swal2-html-container {
    color: #e2e8f0 !important;
}
/*chạy thông báo*/

.marquee-box {
    height: 28px;              /* 👈 cố định chiều cao */
    line-height: 28px;         /* 👈 căn giữa chữ */
    overflow: hidden;
    white-space: nowrap;

    background: #1e293b;
    border-bottom: 1px solid #334155;

}

.marquee-text {
    display: inline-block;
    white-space: nowrap;

    animation: marquee 18s linear infinite;

    color: #60a5fa;
    font-weight: 600;
    font-size: 17px;           /* 👈 chỉnh nhỏ gọn */
}

@keyframes marquee {
    0%   { transform: translateX(100%); }   /* 👈 bắt đầu ngoài màn */
    100% { transform: translateX(-100%); }  /* 👈 chạy qua hết */
}

.marquee-box:hover .marquee-text {
    animation-play-state: paused;
}


/* header card */
.card-header {
    background: #334155;
    padding: 10px 15px;
    font-weight: 600;
    border-bottom: 1px solid #334155;
    color: #fff;
	border-radius: 0;
	border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* body */
.card-body {
    padding: 15px;
    color: #fff;
	align-items: center;
}

.card {
    border-radius: 16px;
    overflow: hidden; /* 👈 QUAN TRỌNG */
	border: 5px solid #334155;
	height: 100%;
}

.card-body label {
    font-size: 13px;
    margin-top: 5px;
	margin-bottom: 2px;
    color: #cbd5f5;
	 width: 100%;
	 text-align: left;
}

.card-body input,
.card-body select {
    background: #020617;
    color: #fff;
    border: 1px solid #334155;
}

.card-body input:focus,
.card-body select:focus {
    border-color: #3b82f6;
    box-shadow: none;
}

/* input nhỏ gọn */
.card-body input,
.card-body select {
    width: 90%;              /* 👈 không full, nhìn đẹp hơn */
    height: 32px;            /* 👈 thấp lại */
    font-size: 13px;
    padding: 4px 8px;

    background: #020617 !important;
    color: #fff !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
}

/* focus */
.card-body input:focus,
.card-body select:focus {
    background: #020617 !important;
    color: #fff !important;
    border-color: #3b82f6 !important;
    box-shadow: none !important;
}

/* giá tiền */
.giatien {
    font-size: 16px;
    margin-top: 8px;
    text-align: center;
}

/* nút */
.card-body button {
    width: 90%;
    height: 34px;
    font-size: 14px;
    border-radius: 8px;
}

.card-body button:hover {
    transform: scale(1.03);
    transition: 0.2s;
}

.card-body select option {
    background: #020617;
    color: #fff;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #020617 inset !important;
    -webkit-text-fill-color: #fff !important;
}

/* ===== HISTORY CARD DARK ===== */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 15px;
    border-bottom: 1px solid #334155;

    background: #1e293b;   /* 👈 nền tối */
    color: #e2e8f0;
}

/* hover */
.history-item:hover {
    background: #020617;
}

/* dòng chính (sdt) */
.history-item .phone {
    font-weight: 600;
    color: #22c55e; /* xanh lá đẹp */
}

/* tiền */
.history-item .price {
    color: #f43f5e; /* đỏ đẹp hơn */
    margin-left: 6px;
    font-weight: 600;
}

/* dòng phụ */
.history-item .sub {
    font-size: 12px;
    color: #94a3b8;
}

/* badge thời gian */
.history-item .time {
    background: #1e293b;
    color: #38bdf8;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #334155;
}


.history-item {
    transition: 0.2s;
}


.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* BOX USER */
.user-box {
    position: relative;
    cursor: pointer;
}

/* text */
.user-info {
    background: #020617;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid #334155;
}

/* DROPDOWN */
.user-dropdown {
    position: absolute;
    right: 0;
    top: 45px;

    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;

    width: 180px;
    display: none;

    z-index: 9999; /* 👈 QUAN TRỌNG */
}

/* item */
.user-item {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.user-item:hover {
    background: #334155;
}

/* logout riêng */
.user-item.logout {
    color: #f87171;
}

/* hiển thị */
.user-dropdown.show {
    display: block;
}

.group-row td {
    font-size: 14px;
    padding: 8px;
}

#customSearch {
    background:#020617;
    color:#fff;
    border:1px solid #334155;
}


@media (max-width: 768px){
    .logo{
        display: none !important;
    }
}


#pageLoader{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
    z-index: 999999;
    overflow: hidden;
}

#pageLoaderBar{
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    transition: width 0.25s ease;
}

#pageLoader{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.08);
    z-index: 999999;
    overflow: visible;
}

#pageLoaderBar{
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    transition: width 0.25s ease;
}

#pageLoaderText{
    position: fixed;
    top: 8px;
    right: 10px;
    font-size: 12px;
    color: #fff;
    background: rgba(15,23,42,0.85);
    padding: 2px 8px;
    border-radius: 6px;
    z-index: 1000000;
}

#donhangTable{
    background: #162133 !important;
    border-color: #2b3a55 !important;
    color: #f8fafc !important;
    margin-bottom: 12px;
    max-width: 420px;
}

#donhangTable thead th{
    background: #22324a !important;
    color: #ffffff !important;
    border-color: #31415d !important;
    font-weight: 600;
}

#donhangTable tbody td{
    background: #182435 !important;
    color: #f1f5f9 !important;
    border-color: #2b3a55 !important;
}

#donhangTable tbody tr:hover td{
    background: #24344d !important;
    cursor: pointer;
}

#proxyTable{
    width: 100%;
    background: #162133 !important;
    border-color: #2b3a55 !important;
    color: #f8fafc !important;
}

.table-scroll-mobile{
    width: 100%;
}

/* ô dữ liệu mặc định không bị tự xuống dòng lộn xộn */
#proxyTable td,
#proxyTable th{
    vertical-align: middle;
}

/* cột dài */
.col-inra{
    max-width: 0;
}

.cell-limit-inra{
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 820px; /* mobile */
}

/* mobile: có cuộn ngang */
@media (max-width: 768px){
    .table-scroll-mobile{
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    #proxyTable{
        min-width: 900px;
    }

    .cell-limit-inra{
        max-width: 600px;
    }

    .table-scroll-mobile::-webkit-scrollbar{
        height: 8px;
    }

    .table-scroll-mobile::-webkit-scrollbar-thumb{
        background: #475569;
        border-radius: 10px;
    }

    .table-scroll-mobile::-webkit-scrollbar-track{
        background: #0f172a;
    }
}

/* pc: rộng hơn nhưng vẫn có giới hạn */
@media (min-width: 769px){
    .cell-limit-inra{
        max-width: 820px;
    }
}