.form-group label,
label {
    color: var(--green-navy);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .015em;
    margin-bottom: .45rem;
}

.form-control,
.custom-select,
select.form-control,
textarea.form-control {
    min-height: 46px;
    border: 1px solid var(--green-border);
    border-radius: 14px;
    color: var(--green-navy);
    background-color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:focus,
.custom-select:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: var(--green-primary);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 .2rem rgba(22, 163, 74, .13), 0 10px 22px rgba(15, 23, 42, .06);
}

.form-control::placeholder {
    color: #9AA8BC;
}

.form-control:disabled,
.form-control[readonly],
.custom-select:disabled,
select.form-control:disabled {
    color: #64748B;
    background: #F8FAFC;
    border-style: dashed;
    opacity: 1;
}

textarea.form-control {
    min-height: 112px;
    resize: vertical;
}

input[type="file"].form-control {
    height: auto;
    min-height: 52px;
    padding: .72rem .85rem;
    border-style: dashed;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .96));
    cursor: pointer;
}

input[type="file"].form-control:hover {
    border-color: var(--green-primary);
    background: rgba(22, 163, 74, .05);
}

input[type="file"].form-control::file-selector-button {
    margin-right: .8rem;
    padding: .45rem .78rem;
    border: 0;
    border-radius: 12px;
    background: var(--green-primary);
    color: #FFFFFF;
    font-weight: 750;
    cursor: pointer;
}

input[type="date"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control,
input[type="time"].form-control,
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"] {
    color-scheme: light;
    min-height: 46px;
    padding-right: .8rem;
    font-weight: 500;
    letter-spacing: .01em;
}

input[type="date"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control,
input[type="time"].form-control {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98));
}

input[type="date"].form-control:hover,
input[type="datetime-local"].form-control:hover,
input[type="month"].form-control:hover,
input[type="time"].form-control:hover {
    border-color: rgba(22, 163, 74, .58);
    background: #FFFFFF;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator,
input[type="month"].form-control::-webkit-calendar-picker-indicator,
input[type="time"].form-control::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    width: 34px;
    height: 34px;
    margin-right: -.35rem;
    padding: .45rem;
    border-radius: 12px;
    background-color: rgba(22, 163, 74, .12);
    cursor: pointer;
    opacity: .86;
    transition: background-color .16s ease, opacity .16s ease, transform .16s ease;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="month"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="time"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(22, 163, 74, .2);
    opacity: 1;
    transform: translateY(-1px);
}

input[type="date"].form-control::-webkit-datetime-edit,
input[type="datetime-local"].form-control::-webkit-datetime-edit,
input[type="month"].form-control::-webkit-datetime-edit,
input[type="time"].form-control::-webkit-datetime-edit {
    color: var(--green-navy);
    padding: 0 .15rem;
}

input[type="date"].form-control::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"].form-control::-webkit-datetime-edit-fields-wrapper,
input[type="month"].form-control::-webkit-datetime-edit-fields-wrapper,
input[type="time"].form-control::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"].form-control::-webkit-datetime-edit-text,
input[type="datetime-local"].form-control::-webkit-datetime-edit-text,
input[type="month"].form-control::-webkit-datetime-edit-text,
input[type="time"].form-control::-webkit-datetime-edit-text {
    color: #94A3B8;
    padding: 0 .12rem;
}

input[type="date"].form-control::-webkit-datetime-edit-day-field,
input[type="date"].form-control::-webkit-datetime-edit-month-field,
input[type="date"].form-control::-webkit-datetime-edit-year-field,
input[type="datetime-local"].form-control::-webkit-datetime-edit-day-field,
input[type="datetime-local"].form-control::-webkit-datetime-edit-month-field,
input[type="datetime-local"].form-control::-webkit-datetime-edit-year-field,
input[type="datetime-local"].form-control::-webkit-datetime-edit-hour-field,
input[type="datetime-local"].form-control::-webkit-datetime-edit-minute-field,
input[type="time"].form-control::-webkit-datetime-edit-hour-field,
input[type="time"].form-control::-webkit-datetime-edit-minute-field {
    border-radius: 6px;
    color: var(--green-navy);
}

input[type="date"].form-control::-webkit-datetime-edit-day-field:focus,
input[type="date"].form-control::-webkit-datetime-edit-month-field:focus,
input[type="date"].form-control::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"].form-control::-webkit-datetime-edit-day-field:focus,
input[type="datetime-local"].form-control::-webkit-datetime-edit-month-field:focus,
input[type="datetime-local"].form-control::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"].form-control::-webkit-datetime-edit-hour-field:focus,
input[type="datetime-local"].form-control::-webkit-datetime-edit-minute-field:focus,
input[type="time"].form-control::-webkit-datetime-edit-hour-field:focus,
input[type="time"].form-control::-webkit-datetime-edit-minute-field:focus {
    background: rgba(22, 163, 74, .14);
    color: var(--green-navy);
}

.form-control-sm[type="date"],
.form-control-sm[type="datetime-local"],
.form-control-sm[type="month"],
.form-control-sm[type="time"] {
    min-height: 40px;
    border-radius: 12px;
}

.form-control-sm[type="date"]::-webkit-calendar-picker-indicator,
.form-control-sm[type="datetime-local"]::-webkit-calendar-picker-indicator,
.form-control-sm[type="month"]::-webkit-calendar-picker-indicator,
.form-control-sm[type="time"]::-webkit-calendar-picker-indicator {
    width: 28px;
    height: 28px;
}

.custom-select,
select.form-control {
    cursor: pointer;
}

.form-check-input,
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--green-primary);
}

.input-group-text {
    border-color: var(--green-border);
    background: #F8FAFC;
    color: var(--green-muted);
}

small[style*="red"],
.text-danger {
    color: var(--green-danger) !important;
    font-weight: 700;
}

hr {
    border-top-color: var(--green-border);
}

h5 {
    color: var(--green-navy);
    font-weight: 700;
}

.img-thumbnail {
    border-color: var(--green-border);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: var(--green-shadow-sm);
    padding: .35rem;
}

.invalid-feedback,
.text-danger {
    font-size: .78rem;
}

.text-muted,
small.text-muted {
    color: #71809A !important;
}

.green-wire-form-card {
    border: 1px solid rgba(221, 230, 241, .96);
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
    overflow: hidden;
}

.green-wire-form-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98));
}

.green-wire-form-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0;
    color: var(--green-navy);
    font-size: 1rem;
    font-weight: 800;
}

.green-wire-form-title i,
.green-wire-section-title i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(22, 163, 74, .12);
    color: var(--green-primary);
}

.green-wire-help {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(14, 165, 233, .18);
    border-radius: 14px;
    background: rgba(14, 165, 233, .08);
    color: #28516F;
}

.green-wire-help i {
    margin-top: .15rem;
    color: var(--green-info);
}

.green-wire-section {
    margin-bottom: 1.2rem;
    padding: 1rem;
    border: 1px solid rgba(221, 230, 241, .86);
    border-radius: 16px;
    background: #FBFCFE;
}

.green-wire-section:last-child {
    margin-bottom: 0;
}

.green-wire-section-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0 0 1rem;
    color: var(--green-navy);
    font-size: .98rem;
    font-weight: 800;
}

.green-wire-field-hint {
    display: block;
    margin-top: .35rem;
    color: #71809A;
    font-size: .76rem;
}

.green-wire-readonly {
    position: relative;
}

.green-wire-readonly .form-control:disabled,
.green-wire-readonly .form-control[readonly] {
    padding-left: 2.35rem;
}

.green-wire-readonly::before {
    content: "\f023";
    position: absolute;
    left: .85rem;
    top: 2.38rem;
    z-index: 2;
    color: #94A3B8;
    font-family: "Font Awesome 6 Free";
    font-size: .76rem;
    font-weight: 900;
}

.green-wire-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--green-border);
    background: #FBFCFE;
}

.green-wire-image-drop {
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 1rem;
    border: 1px dashed var(--green-border);
    border-radius: 16px;
    background: rgba(248, 250, 252, .92);
    color: var(--green-muted);
    text-align: center;
}

.green-wire-image-drop img,
.green-wire-image-preview,
img.zoomP {
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--green-shadow-sm);
}

body.green-dark-mode .form-control,
body.green-dark-mode .custom-select,
body.green-dark-mode select.form-control,
body.green-dark-mode textarea.form-control {
    color: #E5EEF8;
    background-color: #111827;
    border-color: #243044;
}

body.green-dark-mode .form-control:disabled,
body.green-dark-mode .form-control[readonly],
body.green-dark-mode .custom-select:disabled,
body.green-dark-mode select.form-control:disabled {
    color: #A7B4C8;
    background: #0F172A;
}

body.green-dark-mode input[type="file"].form-control {
    background: #0F172A;
}

body.green-dark-mode input[type="date"].form-control,
body.green-dark-mode input[type="datetime-local"].form-control,
body.green-dark-mode input[type="month"].form-control,
body.green-dark-mode input[type="time"].form-control,
body.green-dark-mode input[type="date"],
body.green-dark-mode input[type="datetime-local"],
body.green-dark-mode input[type="month"],
body.green-dark-mode input[type="time"] {
    color-scheme: dark;
    background: #111827;
}

body.green-dark-mode input[type="date"].form-control::-webkit-datetime-edit,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-datetime-edit,
body.green-dark-mode input[type="month"].form-control::-webkit-datetime-edit,
body.green-dark-mode input[type="time"].form-control::-webkit-datetime-edit,
body.green-dark-mode input[type="date"].form-control::-webkit-datetime-edit-day-field,
body.green-dark-mode input[type="date"].form-control::-webkit-datetime-edit-month-field,
body.green-dark-mode input[type="date"].form-control::-webkit-datetime-edit-year-field,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-datetime-edit-day-field,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-datetime-edit-month-field,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-datetime-edit-year-field,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-datetime-edit-hour-field,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-datetime-edit-minute-field,
body.green-dark-mode input[type="time"].form-control::-webkit-datetime-edit-hour-field,
body.green-dark-mode input[type="time"].form-control::-webkit-datetime-edit-minute-field {
    color: #E5EEF8;
}

body.green-dark-mode input[type="date"].form-control::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="datetime-local"].form-control::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="month"].form-control::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="time"].form-control::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="date"]::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="month"]::-webkit-calendar-picker-indicator,
body.green-dark-mode input[type="time"]::-webkit-calendar-picker-indicator {
    background-color: rgba(45, 212, 191, .16);
    filter: invert(1);
}

body.green-dark-mode .green-wire-form-card,
body.green-dark-mode .green-wire-section {
    background: #111827;
    border-color: #243044;
}

body.green-dark-mode .green-wire-form-card .card-header,
body.green-dark-mode .green-wire-footer {
    background: #0F172A;
    border-color: #243044;
}

body.green-dark-mode .green-wire-help {
    color: #C7D2E1;
    background: rgba(14, 165, 233, .12);
    border-color: rgba(56, 189, 248, .22);
}

@media (max-width: 767.98px) {
    .green-wire-form-card .card-header,
    .green-wire-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .green-wire-footer .btn {
        width: 100%;
    }
}
