.page-header {
    background: linear-gradient(135deg, #007DB3 0%, #056C99 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats-section {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 5px solid;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-card.primary {
    border-left-color: #007DB3;
}

.stat-card.success {
    border-left-color: #28a745;
}

.stat-card.info {
    border-left-color: #17a2b8;
}

.stat-card.warning {
    border-left-color: #ffc107;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.primary .stat-icon {
    background: rgba(0, 125, 179, 0.1);
    color: #007DB3;
}

.stat-card.success .stat-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-card.info .stat-icon {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.stat-card.warning .stat-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.quick-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-btn.primary {
    background: #007DB3;
    color: white;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.secondary.active {
    background: #495057;
}

.action-btn.success {
    background: #28a745;
    color: white;
}

.action-btn.info {
    background: #17a2b8;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.content-section {
    padding: 30px;
}

.search-section {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-container i {
    position: absolute !important; /* Thêm !important để override static */
    left: 15px !important;
    top: 1.4rem !important;
    transform: translateY(-50%) !important; /* Center dọc chính xác */
    color: #6c757d !important; /* Đã có, nhưng thêm để chắc */
    z-index: 2; /* Thêm: Đảm bảo icon nằm trên input nếu cần */
    font-size: 1rem; /* Thêm: Điều chỉnh size để dễ thấy */
}

#searchInput {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #007DB3;
    box-shadow: 0 0 0 3px rgba(0, 125, 179, 0.1);
}

.table-section {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.table-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    color: #6c757d;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
}

.tests-table {
    width: 100%;
    border-collapse: collapse;
}

.tests-table th {
    background: linear-gradient(135deg, #007DB3 0%, #056C99 100%);
    color: white;
    padding: 20px;
    font-weight: 600;
    text-align: left;
}

.tests-table td {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.test-row {
    transition: all 0.3s ease;
}

.test-row:hover {
    background: #f8f9fa;
}

.date-container {
    text-align: center;
}

.date-main {
    font-weight: bold;
    color: #333;
    font-size: 0.85rem;
}

.time-sub {
    color: #6c757d;
    font-size: 0.7rem;
    margin-top: 2px;
}

.test-name {
    color: #007DB3;
    font-size: 1.1rem;
}

.topic-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
}

.topic-badge.chart {
    background: #fff3cd;
    color: #856404;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.type-badge.free {
    background: #d4edda;
    color: #155724;
}

.type-badge.premium {
    background: #cce5ff;
    color: #004085;
}

.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #007DB3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.report-btn:hover {
    background: #056C99;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 125, 179, 0.3);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results h4 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 80px 30px;
    color: #666;
}

.empty-icon {
    font-size: 6rem;
    color: #dee2e6;
    margin-bottom: 30px;
}

.empty-content h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.empty-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #007DB3 0%, #056C99 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 125, 179, 0.3);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .quick-actions {
        padding: 15px 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .content-section {
        padding: 10px;
        margin-bottom: 6rem;
    }
    
    .table-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 20px;
    }
    
    .tests-table th,
    .tests-table td {
        padding: 15px 10px;
    }
    
    .date-cell,
    .type-cell,
    .action-cell {
        text-align: center;
    }
    
    .report-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .tests-table {
        font-size: 0.9rem;
    }
    
    .tests-table th,
    .tests-table td {
        padding: 12px 8px;
    }
    
    .test-name {
        font-size: 0.9rem;
    }
    
    .topic-badge,
    .type-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Mặc định ẩn nút mobile trên desktop */
.mobile-report-btn {
    display: none;
    margin-top: 10px; /* Khoảng cách dưới topic-badge */
    text-align: center; /* Căn giữa nút trên mobile */
}

/* Media query cho mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Ẩn cột Hành Động */
    .tests-table th:nth-child(5), /* Ẩn header cột thứ 5 */
    .tests-table td.action-cell { /* Ẩn tất cả td của cột hành động */
        display: none;
    }
    
    /* Hiển thị nút xem báo cáo dưới topic-badge */
    .mobile-report-btn {
        display: block;
    }
    
    /* Điều chỉnh cột Chủ đề để chứa nút mới */
    .topic-cell {
        padding-bottom: 15px; /* Tăng padding để nút không bị chật */
    }
    
    /* Làm bảng responsive hơn trên mobile */
    .tests-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    /* ... (giữ nguyên các style cũ) */
    
    .topic-badge {
        display: inline-block; /* Đảm bảo badge là block để animation mượt */
        padding: 8px 16px; /* Tăng padding để dễ click hơn trên mobile */
        border-radius: 20px; /* Làm tròn hơn cho đẹp */
        transition: transform 0.3s ease; /* Smooth cho animation */
    }
    
    .topic-badge:active {
        transform: scale(0.95); /* Thu nhỏ nhẹ khi click */
    }
}