@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
    color: #333;
}

h1, h2 {
    color: #333;
    font-weight: 700;
    text-align: center;
}

#detailContent table th:first-child,
#detailContent table td:first-child {
    text-align: left;
}

form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

form label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

select:focus {
    border-color: #ff7b29;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 123, 41, 0.5);
}

input[type="text"],
input[type="date"],
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
    border-color: #ff7b29;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 123, 41, 0.5);
}

fieldset {
    margin-bottom: 20px;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
}

legend {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ff7b29;
    padding: 0 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #ff7b29;
    color: white;
    font-weight: 600;
}

#detailContent table th:first-child {
    text-align: left;
}

button {
    background-color: #ff7b29;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #e66a1f;
}

#detailSection {
    border: 1px solid #ddd;
    padding: 20px;
    background-color: #fff;
    max-width: 800px;
    margin: 0 auto 40px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#detailContent p {
    margin: 8px 0;
}

@media (max-width: 600px) {
    form, #detailSection {
        margin: 10px;
        padding: 15px;
    }

    /* Fix date input width */
    input[type="date"] {
        width: 100%;
        box-sizing: border-box;
    }

    table, th, td {
        font-size: 0.9rem;
    }

    button {
        width: 100%;
        padding: 14px;
    }

    /* Fix buttons in admin table */
    #checklistTable button.detailBtn,
    #checklistTable button.deleteBtn {
        width: auto;
        margin: 0 5px 0 0;
        box-sizing: border-box;
        display: inline-block;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Allow buttons container to wrap */
    #checklistTable td:last-child {
        white-space: normal;
    }
}
