body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 56px 0 0 0; /* padding-top là 56px, các giá trị khác là 0 */
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px;
}

/* Header Styles */
header {
    background: #004d26;
    color: #ffffff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #ffffff 10px solid;
}

header a {
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    list-style: none;
}

header li {
    display: inline;
    padding: 0 20px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
}

header nav {
    float: right;
    margin-top: 10px;
}

header .highlight, header .current a {
    color: #4caf50;
    font-weight: bold;
}

header a:hover {
    color: #cccccc;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: url('../img/hero-bg.jpg') no-repeat center center/cover;
    height: 400px;
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero .slogan {
    font-size: 1.2em;
    font-style: italic;
}

/* Content Sections */
.intro, .values, .contact, form {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2e7d32;
}

/* Values Section */
.values ul {
    list-style-type: none;
    padding: 0;
}

.values li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.values li:last-child {
    border-bottom: none;
}

/* Form Styles */
form input[type="text"],
form input[type="password"],
form input[type="date"],
form select,
form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

form input[type="submit"], .button {
    display: inline-block;
    background: #004d26;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form input[type="submit"]:hover, .button:hover {
    background: #003d1f;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table, table {
    width: 100%;
    table-layout: auto;
    min-width: 1200px;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th, .table td, th, td {
    padding: 0.75rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    border: 1px solid #ddd;
}

.table th {
    font-weight: bold;
    text-align: center;
    background-color: #004d26;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table th:nth-child(1), /* ID */
.table th:nth-child(6), /* Tổ Chuyền */
.table th:nth-child(7) { /* Line */
    width: 5%;
}

.table th:nth-child(2), /* Thời Gian */
.table th:nth-child(5), /* Phân Xưởng */
.table th:nth-child(9), /* Trạng Thái */
.table th:nth-child(13), /* Thời Gian Bắt Đầu */
.table th:nth-child(14) { /* Thời Gian Hoàn Thành */
    width: 10%;  
}

.table th:nth-child(3), /* ID Máy */
.table th:nth-child(4), /* Loại Máy */
.table th:nth-child(10) { /* Hình Ảnh */
    width: 8%;
}

.table th:nth-child(8), /* Tình Trạng Máy */
.table th:nth-child(11), /* Nguyên Nhân Sự Cố */
.table th:nth-child(12) { /* Cách Khắc Phục */
    width: 15%;
}

.table th:last-child { /* Hành Động */
    width: 12%;
}

.table .btn {
    white-space: nowrap;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Navigation Styles */
.navbar {
    background-color: #004d26 !important;
    padding: 0.5rem 1rem;
}

.navbar-brand, .nav-link {
    color: #000000 !important;
    font-weight: bold;
}

.navbar-nav {
    display: flex;
    justify-content: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-nav .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    background-color: #004d26 !important;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus,
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #003d1f !important;
    color: white !important;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    color: white !important;
    transition: background-color 0.2s ease-in-out;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    body {
        font-size: 14px;
    }

    .navbar-nav {
        background-color: #003d1f;
        flex-direction: column;
        padding: 10px;
    }

    .navbar-nav .nav-link,
    .navbar-nav .dropdown-item {
        color: white !important;
    }

    .navbar-nav .dropdown-menu {
        background-color: #003d1f;
    }

    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background-color: #002e17;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #f8f9fa;
        z-index: 1000;
    }

    header nav {
        float: none;
        text-align: center;
    }

    header li {
        display: block;
        padding: 10px 0;
    }
}

/* Footer Styles */
footer {
    background: #004d26;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}

/* Slider Styles */
#mainSlider {
    width: 100%;
    max-height: 100vh; /* Thay đổi từ 60vh thành 100vh */
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

#mainSlider .carousel-inner,
#mainSlider .carousel-item {
    height: 100vh; /* Thay đổi để lấp đầy chiều cao màn hình */
}

#mainSlider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* Thay đổi từ center top thành center */
}

.carousel-caption {
    bottom: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
}

.carousel-caption h5 {
    font-size: 24px;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 16px;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 767px) {
    #mainSlider {
        max-height: 100vh; /* Thay đổi từ 40vh thành 100vh */
    }
}

/* Barcode Scanner Styles */
.barcode-scanner-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
}

.barcode-scanner-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.barcode-scanner-container .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

#scanner-error,
#scanning-instructions {
    color: white;
    text-align: center;
    margin-top: 20px;
}

#worker-close-scanner,
#admin-close-scanner {
    margin-top: 20px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.table {
    font-size: 0.9em;
}

.table th, .table td {
    padding: 0.5rem;
}

/* Form Container Styles */
#startRepairForm, #completeRepairForm {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

@media (max-width: 768px) {
    #startRepairForm, #completeRepairForm {
        width: 95%;
    }
}


/* Định dạng cho trạng thái Đang chờ */
.status-pending {
    color: red;
    font-size: 13px; /* Giảm kích thước một chút */
    font-weight: bold;
    background-color: black;
    padding: 5px;
    border-radius: 5px;
}

/* Định dạng cho trạng thái Đang xử lý */
.status-in-progress {
    color: orange; /* Màu vàng cho trạng thái Đang xử lý */
    font-size: 13px; /* Giảm kích thước một chút */
    font-weight: bold;
    background-color: black;
    padding: 5px;
    border-radius: 5px;
}

/* Định dạng cho trạng thái Hoàn thành */
.status-completed {
    color: green; /* Màu xanh lá */
    font-size: 13px; /* Giảm kích thước một chút */
    font-weight: bold;
  /* background-color: none; /* Bỏ nền */
    padding: 5px;
    border-radius: 5px;
}





/* Style cho container phân trang */
.pagination-container {
    width: 100%;
    margin: 20px 0;
    overflow-x: auto;
    padding: 10px 0;
}

/* Style cho phần phân trang */
.pagination {
    margin-bottom: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Style cho từng item trong phân trang */
.pagination .page-item {
    margin: 0 3px;
}

/* Style cho các nút trong phân trang */
.pagination .page-link {
    color: #004d26;
    border: 1px solid #004d26;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    background-color: #fff;
}

/* Style cho nút đang được chọn */
.pagination .page-item.active .page-link {
    background-color: #004d26;
    border-color: #004d26;
    color: #fff;
}

/* Style cho bảng dữ liệu */
.table-responsive {
    min-height: 450px;
    margin-bottom: 20px;
}

/* Đảm bảo bảng không bị thu nhỏ */
.table {
    width: 100% !important;
    margin-bottom: 0;
}


/* Style cho header của bảng */
.table thead th {
    background-color: #004d26;  /* Màu xanh lá */
    color: white;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    border-bottom: 2px solid #003d1f;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Style cho hàng lẻ - màu đậm hơn */
.table-striped tbody tr:nth-child(odd) {
    background-color: #e2e8f0;
}

/* Style cho hàng chẵn */
.table-striped tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Hiệu ứng khi hover - màu đậm hơn */
.table-striped tbody tr:hover {
    background-color: #e2e8f0;
    cursor: default;
}

/* Style cho các ô trong bảng - viền đậm hơn */
.table td {
    vertical-align: middle !important;
    padding: 10px 8px !important;
    border: 1px solid #cbd5e0;
}

/* Đảm bảo bảng responsive */
.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

/* Style cho scrollbar */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Icon ❓ */
#floating-help-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #FFD700; /* Màu vàng */
    color: white; /* Màu chữ trắng */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#floating-help-icon:hover {
    background-color: #FFC107; /* Màu vàng đậm hơn khi hover */
}


/* Modal hiển thị hướng dẫn */
#help-modal {
    display: none; /* Ẩn mặc định */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
}

/* Nút đóng */
#close-help {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

#close-help:hover {
    background-color: #0056b3;
}

.form-note {
    font-size: 1rem; /* Cỡ chữ vừa phải */
    font-weight: bold; /* In đậm để nổi bật */
    color: #856404; /* Màu chữ vàng nâu */
    background-color: #fff3cd; /* Nền màu vàng nhạt */
    border: 1px solid #ffeeba; /* Viền vàng nhạt */
    padding: 10px; /* Khoảng cách bên trong */
    border-radius: 5px; /* Bo góc nhẹ */
    margin-top: 8px; /* Khoảng cách phía trên */
}
