/* =========================
   Form Container
========================= */

#EntityFormPanel,
.crmEntityFormView {
    border: none;
    background: #ffffff;
    font-family: Arial, sans-serif;
    color: #2A2C2E;
}

.crmEntityFormView {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

/* Remove extra default form borders */
.crmEntityFormView fieldset {
    border: none;
    padding: 0;
    margin: 0 0 24px 0;
}

/* =========================
   Headings / Section Titles
========================= */

.crmEntityFormView h1,
.crmEntityFormView h2,
.crmEntityFormView h3,
.crmEntityFormView legend {
    color: #2A2C2E;
    font-family: Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Optional: hide duplicate section title if needed */
/*
.crmEntityFormView legend {
    display: none;
}
*/

/* =========================
   Labels
========================= */

.crmEntityFormView label {
    display: block;
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2A2C2E;
}

/* Required asterisk */
.crmEntityFormView label .required,
.crmEntityFormView .required {
    color: #c00000;
}

/* =========================
   Inputs / Selects / Textareas
========================= */

.crmEntityFormView input[type="text"],
.crmEntityFormView input[type="email"],
.crmEntityFormView input[type="tel"],
.crmEntityFormView input[type="number"],
.crmEntityFormView input[type="date"],
.crmEntityFormView input[type="password"],
.crmEntityFormView select,
.crmEntityFormView textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #b8b8b8;
    border-radius: 6px;
    background-color: #ffffff;
    color: #2A2C2E;
    font-family: Arial, sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

/* Focus state */
.crmEntityFormView input:focus,
.crmEntityFormView select:focus,
.crmEntityFormView textarea:focus {
    outline: none;
    border-color: #026490;
    box-shadow: 0 0 0 2px rgba(2, 100, 144, 0.2);
}

/* Disabled / readonly fields */
.crmEntityFormView input[disabled],
.crmEntityFormView input[readonly],
.crmEntityFormView select[disabled],
.crmEntityFormView textarea[disabled],
.crmEntityFormView textarea[readonly] {
    background-color: #f3f3f3;
    color: #666;
    cursor: not-allowed;
}

/* =========================
   Field Spacing
========================= */

.crmEntityFormView .cell,
.crmEntityFormView .control,
.crmEntityFormView .info {
    margin-bottom: 16px;
}

/* =========================
   Buttons
========================= */

#customSubmitBtn,
.btn-primary,
.crmEntityFormView .btn-primary {
    color: #ffffff;
    background-color: #026490;
    border: 1px solid #026490;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 22px;
    width: fit-content;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#customSubmitBtn:hover,
.btn-primary:hover,
.crmEntityFormView .btn-primary:hover {
    color: #ffffff;
    background-color: #013248;
    border-color: #013248;
}

/* =========================
   Validation / Error Text
========================= */

.crmEntityFormView .validation-summary-errors,
.crmEntityFormView .field-validation-error {
    color: #c00000;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

/* =========================
   Mobile
========================= */

@media (max-width: 768px) {
    .crmEntityFormView {
        padding: 16px;
    }

    #customSubmitBtn,
    .btn-primary,
    .crmEntityFormView .btn-primary {
        width: 100%;
    }
}