/* =========================
   FORM LAYOUT
========================= */

form {
    width: 95%;
    max-width: 900px;          /* was 600px */
    margin: 0 auto;
    padding: 15px;
    background: #fff;
    border: 1px solid #cfd8cf;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* =========================
   LABELS
========================= */

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* =========================
   GLOBAL INPUTS
========================= */

input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-top: 5px;
    font-size: 14px;
    border: 1px solid #999;
    border-radius: 6px;
}

.notes-field {
    min-height: 50px;
}

/* =========================
   BUTTONS
========================= */

button,
input[type="submit"] {
    width: auto;
    padding: 10px 14px;
    margin-top: 15px;
    background: #3d6b47;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: #315639;
}

/* =========================
   QUICK ENTRY ROWS
========================= */

.quick-entry-row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    align-items: flex-end;
    flex-wrap: nowrap;
}

.field-small {
    flex: 1;
    min-width: 0;
}

.field-narrow {
    flex: 0 0 140px;
    max-width: 140px;
}

.field-temp {
    flex: 0 0 70px;
    max-width: 70px;
}


.quick-entry-row label {
    margin-top: 0;
    font-size: 12px;
}

.quick-entry-row input,
.quick-entry-row select,
.quick-entry-row textarea,
.field-small input,
.field-small select,
.field-small textarea,
.field-narrow input,
.field-narrow select,
.field-temp input {
    width: 100%;
    padding: 6px;
    font-size: 14px;
    line-height: 1.2;
    box-sizing: border-box;
}


.field-temp input {
    text-align: center;
}

/* =========================
   TABLES
========================= */

table {
    width: 95%;
    margin: 20px auto;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    border: 1px solid #555;
    padding: 8px 10px;
}

th {
    background: #d9d9d9;
    font-weight: bold;
}

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

tr:nth-child(odd) {
    background: #fff;
}

/* =========================
   LINK BUTTON
========================= */

.link-button {
    all: unset;
    display: inline;
    color: #06c;
    text-decoration: underline;
    cursor: pointer;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    form {
        padding: 12px;
    }

    .quick-entry-row {
        flex-wrap: wrap;
    }

    .field-small,
    .field-narrow,
    .field-temp {
        flex: 1 1 100%;
        max-width: 100%;
    }

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