* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #f4f4f4;
    overflow-y: auto;
    padding: 20px;
}

.container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.status p {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.buttons {
    margin: 20px 0;
}

button {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#start-pallet {
    background-color: #007bff;
    color: white;
}

#start-pallet:hover {
    background-color: #0056b3;
}

#finalize-pallet {
    background-color: #28a745;
    color: white;
}

#finalize-pallet:hover {
    background-color: #218838;
}

button.back-button {
    background-color: #6c757d;
    color: white;
}

button.back-button:hover {
    background-color: #5a6268;
}

.scan-section {
    margin: 20px 0;
}

input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    margin-bottom: 10px;
}

#scan-button {
    background-color: #ff9800;
    color: white;
}

#scan-button:hover {
    background-color: #e68900;
}

#search-button {
    background-color: #ff9800;
    color: white;
}

#search-button:hover {
    background-color: #e68900;
}

p#message {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    min-height: 20px;
}

p#search-result {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    min-height: 20px;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    padding: 10px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: #007bff;
    color: white;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

a.pallet-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

a.pallet-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        max-width: 400px;
    }

    h1 {
        font-size: 20px;
    }

    button {
        font-size: 16px;
        padding: 12px;
    }

    input {
        font-size: 16px;
        padding: 12px;
    }

    th, td {
        font-size: 14px;
        padding: 8px;
    }
}