* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f4f4;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.section {
    display: none;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100vh;
}

.section.active {
    display: block;
}

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #ff6f61, #de1d23);
    z-index: 1;
}

.login-section.active {
    display: flex;
}

.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://gitiho.com/caches/p_medium_large//uploads/338054/images/image_32-hinh-nen-powerpoint-trong-dong.jpg') repeat;
    opacity: 0.1;
    z-index: 1;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    z-index: 10;
    position: relative;
}

.login-title {
    font-size: 24px;
    color: #de1d23;
    margin-bottom: 10px;
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.error-text {
    display: none;
    color: #de1d23;
    font-size: 12px;
    margin-top: 5px;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background: #de1d23;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #b82e2e;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.error-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 101;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.error-popup h3 {
    font-size: 18px;
    color: #de1d23;
    margin-bottom: 10px;
}

.error-popup p {
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
}

.error-popup button {
    padding: 10px 20px;
    background: #de1d23;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

header {
    background: #de1d23;
    color: white;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-container h1 {
    font-size: 20px;
}

.language-select select {
    padding: 5px;
    border-radius: 5px;
    font-size: 14px;
}

.logout-btn {
    padding: 8px 15px;
    background: #fff;
    color: #de1d23;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.search-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.search-row .form-group {
    flex: 1;
    min-width: 200px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-clear {
    background: #f4f4f4;
    color: #333;
}

.btn-clear:hover {
    background: #ddd;
}

.btn-search {
    background: #de1d23;
    color: white;
}

.btn-search:hover {
    background: #b82e2e;
}

.results-table {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-export {
    background: #28a745;
    color: white;
}

.btn-export:hover {
    background: #218838;
}

.btn-add {
    background: #007bff;
    color: white;
}

.btn-add:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f4f4f4;
    font-weight: bold;
}

.action-btn {
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

.action-btn:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.pagination select {
    padding: 5px;
    border-radius: 5px;
}

.pagination button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background: #ddd;
    cursor: pointer;
    margin-left: 5px;
}

.pagination button.active {
    background: #de1d23;
    color: white;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-back {
    background: #6c757d;
    color: white;
}

.btn-back:hover {
    background: #5a6268;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 18px;
}

.close {
    font-size: 24px;
    cursor: pointer;
}

.error {
    display: none;
    color: #de1d23;
    font-size: 12px;
    margin-top: 5px;
}

.notification {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px;
    border-radius: 5px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.notification.show {
    opacity: 1;
}

.notification.info {
    background: #007bff;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

#notificationClose {
    display: none;
    margin-left: 10px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    .section {
        padding: 10px;
    }
    .login-container {
        margin-top: 20px;
        width: 90%;
        padding: 20px;
    }
    .search-row .form-group {
        min-width: 100%;
    }
    .button-group {
        justify-content: center;
    }
    table {
        font-size: 12px;
    }
    th, td {
        padding: 8px;
    }
}