/* ======================================================
   BASE FORM CONTAINER
   ====================================================== */

.adnl-pretrip-form {
    max-width: 900px;
    margin: 10px auto;
    font-family: inherit;
}

.pretrip-bordered-form {
    border: 2px solid #ddd;
    padding: 20px;
    border-radius: 6px;
    background: #fafafa;
}

.pretrip-spacer {
    height: 16px;
}

/* ======================================================
   FIELD LAYOUT (FIXED WIDTH + LABEL RIGHT)
   ====================================================== */

.field-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

/* INPUT WIDTH — SINGLE SOURCE OF TRUTH */
.field-row input,
.field-row select {
    width: 300px;
    height: 44px;
    padding: 6px 10px;
    font-size: 14px;
    box-sizing: border-box;
}

/* LABEL ON RIGHT — NEVER FLOAT */
.field-label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

/* STACKED GROUPS (Start + Odometer, End + Odometer) */
.field-stack {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

/* ======================================================
   NO DEFECTS FOUND
   ====================================================== */

.no-defects-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px;
}

.no-defects-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.no-defects-row label {
    font-weight: 600;
    cursor: pointer;
}

/* ======================================================
   SELECT ALL BUTTON
   ====================================================== */

#select_all_inspection {
    display: inline-block;
    margin: 10px 0 18px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
}

/* ======================================================
   INSPECTION ITEMS
   ====================================================== */

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 40px;
    margin-top: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.check-item span {
    line-height: 1.3;
}

/* ======================================================
   SUBMIT ROW
   ====================================================== */

.adnl-pretrip-form .row {
    margin-top: 16px;
}

/* ======================================================
   NOTES + MESSAGES
   ====================================================== */

.adnl-pretrip-form .note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.notice.success {
    color: #0a0;
    padding: 10px;
    background: #efe;
    border: 1px solid #cfc;
}

.notice.error {
    color: #a00;
    padding: 10px;
    background: #fee;
    border: 1px solid #fcc;
}

/* ======================================================
   MOBILE OPTIMIZATION
   ====================================================== */

@media (max-width: 768px) {

    .field-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .field-row input,
    .field-row select {
        width: 100%;
        max-width: 100%;
    }

    .field-label {
        margin-top: 4px;
        font-size: 13px;
    }

    .check-grid {
        grid-template-columns: 1fr;
    }

    #select_all_inspection {
        width: 100%;
        text-align: center;
    }
}


/* ======================================================
   My Existing Pre-Trip Inspection Reports
   ====================================================== */
.pretrip-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.pretrip-list th,
.pretrip-list td {
    white-space: nowrap;
}

.icon-cell {
    text-align: center;
}

.icon-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    text-decoration: none;
}

.icon-btn:hover {
    background: #eaeaea;
}

.icon-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.status.active {
    color: #0a7f28;
    font-weight: bold;
}

.status.expired {
    color: #b00020;
    font-weight: bold;
}
