/* wwwroot/css/shared-index.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-container {
    display: flex;
    flex-direction: column;
    /* min-width: auto; */
    margin: 3rem 1rem 0 1rem;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 2rem 1rem 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.page-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin: 1rem 2rem 1rem 2rem;
    display: block;
    align-items: center;
    flex-direction: column;
}

.form-label {
    display: block;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.form-select {
    display: block;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* căn giữa nội dung */
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 40px; /* đảm bảo chiều cao giống nhau */
    box-sizing: border-box;
    white-space: nowrap; /* không bị gãy dòng */
    appearance: none; /* loại bỏ style mặc định */
}

.btn-primary {
    background: #0062a3;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #009657;
    color: white;
}

.btn-secondary:hover {
    background: #bb5d5d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Table styles */

.data-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.table-actions {
    display: flex;
    gap: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f8f9fa;
}

.page-link.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}
//shared_search
.search-box {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.search-box input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    margin-right: 5px;
    border-radius: 4px 0 0 4px;
}

.search-box button[type="submit"] {
    padding: 8px;
    border: none;
    background-color: #4caf50;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

.search-box button[type="submit"]:hover {
    background-color: #3e8e41;
}
/* Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .data-table {
        flex-direction: row;
        /* display: block; */
        overflow-x: auto;
    }

    .table-actions {
        flex-direction: column;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #95a5a6;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}
