/* css/pages/test-management.css */
/* Styles for data tables used in management pages */

.page-header-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.table-wrapper {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
    overflow: hidden; /* Giữ cho các góc bo tròn không bị ảnh hưởng */
    overflow-x: auto; /* Thêm thanh cuộn ngang khi cần trên màn hình nhỏ */
    border: 1px solid var(--color-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}


.data-table th,
.data-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table thead th {
    background-color: var(--color-surface-soft);
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: hsla(210, 100%, 50%, 0.04); /* A very light blue on hover */
}

.actions-cell {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.actions-cell .button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.2;
}
.actions-cell .button i {
    margin-right: 0.25rem;
}
.actions-cell .button-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.2;
}
.actions-cell .button-small i {
    margin-right: 0;
}

/* Style for icon-only buttons in table */
.actions-cell .button-small {
    padding: 0.5rem 0.75rem;
    line-height: 1;
    font-size: 0.9rem;
}

/* Style for icon-only buttons in table */
.actions-cell .button-small {
    padding: 0.5rem 0.75rem;
    line-height: 1;
    font-size: 0.9rem;
}

/* Style for warning/reset buttons */
.button.button-warning {
    background-color: hsl(45, 100%, 95%);
    color: hsl(35, 100%, 40%);
    border-color: hsl(45, 100%, 80%);
}
.button.button-warning:hover {
    background-color: var(--color-warning);
    color: var(--color-text-primary);
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-large);
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-text-primary);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-surface-soft);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-bottom-left-radius: var(--border-radius-medium);
    border-bottom-right-radius: var(--border-radius-medium);
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}