/* =================================================
   CSS CHO BẢNG ĐIỀU KHIỂN (dashboard.css)
================================================= */
/* =================================================
   CSS ẨN TIÊU ĐỀ TRANG CHỦ MẶC ĐỊNH CỦA ASTRA
================================================= */
.ast-single-post .entry-header,
.page-title {
    display: none !important;
}

/* =================================================
   HEADER CHÀO MỪNG & VIP BADGE
================================================= */
.dashboard-welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-text h2.welcome-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #0f172a;
    font-weight: 700;
    border: none;
    padding: 0;
}

.welcome-text h2.welcome-title span {
    color: #3b82f6; /* Tên người dùng màu xanh dương nổi bật */
}

.welcome-text p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

/* Nút hiển thị Lượt VIP cực đẹp (Gradient Vàng/Cam) */
.welcome-vip-badge {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 10px 22px;
    border-radius: 50px;
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: transform 0.3s ease;
    cursor: default;
}

.welcome-vip-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.welcome-vip-badge .vip-icon {
    font-size: 24px;
    margin-right: 12px;
    line-height: 1;
}

.welcome-vip-badge .vip-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.welcome-vip-badge .vip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-weight: 700;
}

.welcome-vip-badge .vip-count {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}
/* Khung bọc toàn bộ Dashboard */
.user-dashboard-wrapper {
    max-width: 850px;
    margin: 0 auto;
    font-family: inherit;
    padding: 20px 0;
}

/* =================================================
   1. KHỐI THẺ THỐNG KÊ (CARDS)
================================================= */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.dash-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

/* Màu riêng cho Thẻ Số Dư */
.card-balance .card-icon {
    background-color: #eff6ff;
    color: #3b82f6; /* Xanh dương */
}

/* Màu riêng cho Thẻ Số Link */
.card-links .card-icon {
    background-color: #f0fdf4;
    color: #22c55e; /* Xanh lá */
}

.card-info h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
}

.card-value span {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 500;
}

/* =================================================
   2. TIÊU ĐỀ SECTION
================================================= */
.dashboard-section-title {
    font-size: 20px;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

/* =================================================
   3. BẢNG LỊCH SỬ GIAO DỊCH
================================================= */
.table-responsive {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Đảm bảo bảng không bị vỡ trên Mobile */
}

.dashboard-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-table td {
    padding: 16px 20px;
    color: #334155;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-table tbody tr:hover {
    background-color: #f8fafc; /* Đổi màu nhẹ khi di chuột qua hàng */
}

/* Kiểu dáng riêng cho từng cột */
.td-code .code-badge {
    background: #f1f5f9;
    color: #3b82f6;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.5px;
}

.td-price {
    color: #ef4444 !important; /* Màu đỏ thể hiện tiền bị trừ */
    font-weight: 600;
}

.td-time {
    color: #64748b !important;
    font-size: 14px !important;
}

/* =================================================
   4. TRẠNG THÁI TRỐNG (Khi chưa mua link)
================================================= */
.dashboard-empty-state {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 50px 20px;
    text-align: center;
    color: #64748b;
}

.dashboard-empty-state svg {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.dashboard-empty-state p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}
/* =================================================
   GIAO DIỆN HEADER BẢNG & TÌM KIẾM
================================================= */
.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-section-header .dashboard-section-title {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Khung ô tìm kiếm */
.dashboard-search {
    position: relative;
    width: 100%;
    max-width: 280px;
}

.dashboard-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.dashboard-search input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 14px;
    color: #334155;
    transition: all 0.2s;
    box-sizing: border-box;
    outline: none;
}

.dashboard-search input:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* =================================================
   NÚT MỞ LINK ĐÍCH
================================================= */
.btn-open-link {
    display: inline-block;
    padding: 6px 14px;
    background-color: #eff6ff;
    color: #3b82f6;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.btn-open-link:hover {
    background-color: #3b82f6;
    color: #ffffff;
}
/* =================================================
   GIAO DIỆN PHÂN TRANG (PAGINATION)
================================================= */
.dashboard-pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dashboard-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.dashboard-pagination .page-numbers.current {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.dashboard-pagination .page-numbers:hover:not(.current) {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #3b82f6;
}

.dashboard-pagination .prev, .dashboard-pagination .next {
    font-weight: 700;
}