/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 20px;
    padding: 0;
}

/* Header Styles */
header {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
}

/* Main Content */
main {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

form label {
    font-size: 1rem;
    margin-bottom: 8px;
}

form input,
form select,
form textarea,
form button {
    padding: 10px;
    margin-bottom: 15px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

form input[type="text"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
    width: 100%;
}

form button {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    border: none;
}

form button:hover {
    background-color: #45a049;
}

form button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

/* Client and Item List Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f4f4f4;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Item Form Specific */
.item-type-select {
    width: 100%;
}

/* Image Upload Styles */
.image-upload-container {
    margin-top: 20px;
}

.image-upload-container input[type="file"] {
    padding: 10px;
}

.image-preview {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.image-preview img {
    max-width: 100%;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Preview Page Styles */
.preview-page {
    max-width: 1200px;
    margin: 0 auto;
}

.preview-page h2 {
    color: #333;
    margin-bottom: 20px;
}

.preview-page p {
    font-size: 1rem;
    margin-bottom: 10px;
}

.preview-page table {
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
}

.preview-page th, .preview-page td {
    padding: 10px;
    border: 1px solid #ddd;
}

.preview-page .preview-image {
    max-width: 100%;
    height: auto;
    margin: 10px;
    max-height: 300px;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: #f9f9f9;
}

.preview-page .image-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-page button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    border: none;
}

.preview-page button:hover {
    background-color: #45a049;
}

.preview-page .button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    cursor: pointer;
    margin-top: 20px;
}

.preview-page .button:hover {
    background-color: #45a049;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    main {
        padding: 10px;
    }

    form {
        width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    .image-preview {
        justify-content: center;
    }

    .preview-page table {
        font-size: 0.9rem;
    }

    .preview-page .preview-image {
        max-width: 100%;
        max-height: 200px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .image-upload-container input[type="file"] {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    .preview-page p,
    .preview-page h2 {
        font-size: 0.9rem;
    }

    form input, form select, form textarea {
        font-size: 0.9rem;
        padding: 8px;
    }

    table, th, td {
        font-size: 0.9rem;
    }
}
