/* Reset mặc định */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font chữ tiếng Việt */
body {
    font-family: 'Roboto', 'Noto Sans Vietnamese', sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
}

/* Toolbar */
.toolbar {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 60px;
}

.toolbar .logo img {
    width: 100px;
    height: 60px;
    border-radius: 8px; /* Bo tròn góc */
    border: 1px solid #e0e0e0; /* Viền nhẹ */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Bóng đổ */
    transition: transform 0.3s ease; /* Hiệu ứng mượt */
}

.toolbar .logo img:hover {
    transform: scale(1.1); /* Phóng to khi hover */
}

.toolbar .logo a {
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar .nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.toolbar .nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.toolbar .nav-links a:hover {
    background-color: #0056b3;
}

/* Container chính */
.container {
    max-width: 1200px;
    margin: 70px auto 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tiêu đề */
h2 {
    color: #007bff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 24px;
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input, select, button {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

button {
    background-color: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* Product item */
.product-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.product-item input {
    flex: 1;
}

.add-product-btn {
    background-color: #28a745;
    padding: 8px 12px;
    font-size: 16px;
}

.add-product-btn:hover {
    background-color: #218838;
}

/* Bảng */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 600px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

th {
    background-color: #007bff;
    color: #fff;
}

tr:hover {
    background-color: #f9f9f9;
}

/* Tổng tiền */
.total-row {
    font-weight: bold;
    background-color: #e9ecef;
}

/* Dropdown cho hành động */
.action-dropdown {
    position: relative;
    display: inline-block;
}

.action-btn {
    background-color: #28a745;
    color: #fff;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.action-btn:hover {
    background-color: #218838;
}

.action-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 4px;
    right: 0;
}

.action-menu a, .action-menu form {
    display: block;
}

.action-menu a, .action-menu button {
    color: #333;
    padding: 8px 12px;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.action-menu a:hover, .action-menu button:hover {
    background-color: #f4f7fa;
}

.action-dropdown:hover .action-menu {
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background-color: #007bff;
    color: #fff;
    width: 100%;
    margin-top: 30px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        padding: 10px;
        min-height: 80px;
    }
    .toolbar .logo a {
        font-size: 18px;
    }
    .toolbar .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }
    .toolbar .nav-links a {
        font-size: 12px;
        padding: 5px 8px;
    }
    .container {
        margin: 100px 10px 20px;
        padding: 10px;
    }
    h2 {
        font-size: 20px;
    }
    form {
        max-width: 100%;
        padding: 0 10px;
    }
    .product-item {
        flex-direction: column;
        align-items: stretch;
    }
    table {
        font-size: 12px;
    }
    th, td {
        padding: 8px;
    }
    .action-btn {
        font-size: 12px;
        padding: 5px 8px;
    }
    .action-menu {
        min-width: 100px;
    }
}
