body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 20px;
}

#app-container {
    background-color: #ffffff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

header h1 {
    color: #0056b3; /* A slightly more professional blue */
    margin: 0;
    font-size: 1.8em;
}

main section {
    margin-bottom: 30px;
}

h2 {
    color: #333;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px; /* Slightly reduced margin */
}

label {
    display: block;
    margin-bottom: 6px; /* Slightly reduced margin */
    font-weight: bold;
    color: #555;
    font-size: 0.95em;
}

input[type="text"],
input[type="tel"],
input[type="date"],
textarea#item-description {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

input[type="date"] {
    appearance: none; /* Optional: for more custom styling if needed */
}


textarea#item-description {
    min-height: 80px;
    resize: vertical;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea#item-description:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.form-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
}

.button {
    padding: 10px 18px;
    font-size: 1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-right: 10px;
    margin-top: 10px;
    text-align: center;
}

.button.primary {
    background-color: #007bff;
    color: white;
}

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

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

.button.secondary:hover {
    background-color: #545b62;
}

#qrcode-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: inline-block; 
    min-width: 256px; 
    min-height: 256px; 
    text-align: center; 
}

#qrcode-container img {
    display: block; 
    margin: 0 auto; 
}

.item-details-box {
    padding: 15px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-height: 100px;
}

.item-details-box p {
    margin: 0 0 8px 0; /* Add some space between paragraphs */
    word-break: break-word;
}
.item-details-box p:last-child {
    margin-bottom: 0;
}
.item-details-box p strong {
    color: #333;
}


footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #6c757d;
}

/* Hide/Show utility */
.hidden {
    display: none;
}

/* Accessibility */
[aria-describedby] {
    /* You can add styles if needed, but this is mostly for screen readers */
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    #app-container {
        margin: 10px;
        padding: 15px;
    }
    header h1 {
        font-size: 1.6em;
    }
    h2 {
        font-size: 1.3em;
    }

    input[type="text"],
    input[type="tel"],
    input[type="date"],
    textarea#item-description {
        width: 100%; /* Full width on smaller screens */
    }

    .button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    .button:last-of-type {
        margin-bottom: 0;
    }
    #qrcode-container {
      display: flex; 
      justify-content: center; 
      align-items: center; 
      width: auto; 
      max-width: 100%;
      padding: 10px;
    }
    #qrcode-container img {
      max-width: 100%; 
      height: auto; 
    }
}