/* Source module for 48px form controls and validation states. Served bundle: public/admin/css/admin.css */
/* Admin SaaS form component system */
.admin-form-label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 14px;
    font-weight: 600
}

.admin-required {
    color: #ef4444
}

.admin-form-help {
    margin: 7px 0 0;
    color: #667085;
    font-size: 13px
}

.admin-form-control,
.form-control.admin-form-control,
.form-select.admin-form-control {
    width: 100%;
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #ffffff;
    padding: 0px 10px;
    color: #111827;
    font-family: Roboto, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    box-shadow: none;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease
}

.dark .admin-form-control,
.dark .form-control.admin-form-control,
.dark .form-select.admin-form-control {
    background-color: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

.admin-form-control::placeholder {
    color: #98a2b3
}

.dark .admin-form-control::placeholder {
    color: #64748b;
}

.admin-form-control:hover:not(:disabled):not([readonly]) {
    border-color: #b8c1ce;
}

.dark .admin-form-control:hover:not(:disabled):not([readonly]) {
    border-color: #475569;
}

.admin-form-control:focus {
    border-color: var(--primary-color, #2ca58d);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #2ca58d) 20%, transparent);
}

.admin-form-control.is-invalid,
.admin-form-control[aria-invalid=true] {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.admin-form-control.is-valid {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.admin-form-control:disabled,
.admin-form-control[readonly] {
    border-color: #e2e8f0;
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: .75;
    box-shadow: none;
}

.dark .admin-form-control:disabled,
.dark .admin-form-control[readonly] {
    border-color: #1e293b;
    background-color: #1e293b;
    color: #64748b;
}

.admin-form-textarea {
    min-height: 120px !important;
    padding: 16px 18px !important;
    resize: vertical
}

.admin-form-select {
    padding-right: 48px !important
}

.admin-multi-select {
    min-height: 130px !important;
    padding-block: 10px !important
}

.admin-search-control {
    position: relative
}

.admin-search-control>i {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #667085;
    font-size: 16px
}

.admin-search-control .admin-form-control {
    padding-left: 36px !important;
    padding-right: 36px !important
}



.admin-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

.admin-file-upload {
    display: flex;
    min-height: 92px;
    align-items: center;
    gap: 14px;
    border: 1px dashed #b8c1ce;
    border-radius: 14px;
    background: #f8fafc;
    padding: 16px 18px;
    cursor: pointer;
    transition: .2s ease
}

.admin-file-upload:hover {
    border-color: var(--primary-color);
    background: #fff
}

.admin-file-upload>i {
    color: var(--primary-color);
    font-size: 28px
}

.admin-file-upload span {
    display: flex;
    flex-direction: column
}

.admin-file-upload strong {
    color: #111827;
    font-size: 15px
}

.admin-file-upload small {
    color: #667085;
    font-size: 13px
}

.admin-choice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px
}

.admin-choice .form-check-input {
    width: 22px;
    height: 22px;
    margin: 0;
    border: 1px solid #b8c1ce;
    box-shadow: none
}

.admin-checkbox {
    border-radius: 6px !important
}

.admin-radio {
    border-radius: 50% !important
}

.admin-choice .form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent)
}

.admin-choice .form-check-input:checked {
    border-color: var(--primary-color);
    background-color: var(--primary-color)
}

.admin-choice-label {
    display: flex;
    flex-direction: column;
    color: #344054;
    font-size: 15px;
    font-weight: 500
}

.admin-choice-label small {
    color: #667085;
    font-size: 13px;
    font-weight: 400
}

.admin-switch-wrap {
    grid-template-columns: 46px minmax(0, 1fr)
}

.admin-switch {
    width: 46px !important;
    height: 26px !important;
    border-radius: 999px !important
}

.admin-button {
    min-height: 35px !important;
    border-radius: 5px !important;
    padding-inline: 10px !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease
}

.admin-button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent) !important
}

.admin-icon-action {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 5px !important
}

.admin-action-button {
    min-height: 32px !important;
    padding-inline: 8px !important
}

.admin-dropdown-menu {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e4e7ec !important;
    border-radius: 14px !important;
    background: #fff !important;
    padding: 8px !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .14) !important
}

.admin-dropdown-menu .dropdown-item {
    min-height: 44px;
    border-radius: 9px;
    padding: 10px 14px;
    color: #344054
}

.admin-dropdown-menu .dropdown-item:hover,
.admin-dropdown-menu .dropdown-item:focus {
    background: #f1f5f9;
    color: #0f766e
}

.admin-dropdown-menu .dropdown-item.active {
    background: var(--primary-color);
    color: #fff
}

.admin-icon-control {
    position: relative
}

.admin-icon-control>i {
    position: absolute;
    right: 18px;
    bottom: 19px;
    color: #667085;
    pointer-events: none
}

.dark .admin-form-label,
.dark .admin-choice-label {
    color: #e2e8f0
}

.dark .admin-form-control {
    border-color: #344054 !important;
    background: #101828 !important;
    color: #f8fafc !important
}

.dark .admin-form-control:hover,
.dark .admin-form-control:focus {
    background: #182230 !important
}

.dark .admin-form-help,
.dark .admin-choice-label small {
    color: #98a2b3
}

.dark .admin-file-upload {
    border-color: #475467;
    background: #101828
}

.dark .admin-file-upload strong {
    color: #f8fafc
}

.dark .admin-dropdown-menu {
    border-color: #344054 !important;
    background: #101828 !important
}

.dark .admin-dropdown-menu .dropdown-item {
    color: #e2e8f0
}

@media(max-width:639px) {
    .admin-form-control {
        font-size: 16px !important
    }

    .admin-button:not(.admin-icon-action) {
        width: 100%
    }

    .admin-dropdown {
        width: 100%
    }

    .admin-dropdown>.admin-button {
        width: 100%
    }
}

/* Project-wide legacy control bridge: applies the component system to every admin module. */
.admin-main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.dataTables_filter input),
.admin-main select:not(.dataTables_length select),
.admin-main textarea {
    min-height: 35px !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    padding: 0px 10px !important;
    color: #111827 !important;
    font-family: Roboto, system-ui, sans-serif;
    font-size: 14px !important;
    font-weight: 300 !important;
    box-shadow: none !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease
}

.admin-main textarea {
    min-height: 120px !important;
    padding: 16px 18px !important;
    resize: vertical
}

.admin-main select {
    padding-right: 48px !important
}

.admin-main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.admin-main select:hover,
.admin-main textarea:hover {
    border-color: #b8c1ce !important;
    background: #fff !important
}

.admin-main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.admin-main select:focus,
.admin-main textarea:focus {
    border-color: var(--primary-color) !important;
    outline: 0 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent) !important
}

.admin-main input[type=file] {
    min-height: 35px !important;
    border: 1px dashed #b8c1ce !important;
    border-radius: 5px !important;
    background: #f8fafc !important;
    padding: 3px 6px !important;
    color: #344054 !important;
    font-size: 14px !important
}

.admin-main input[type=file]::file-selector-button {
    height: 27px;
    margin-right: 12px;
    border: 0;
    border-radius: 3px;
    background: #ccfbf1;
    padding: 0 14px;
    color: #0f766e;
    font-weight: 600
}

.admin-main input[type=checkbox]:not(.sr-only),
.admin-main input[type=radio]:not(.sr-only) {
    width: 22px !important;
    height: 22px !important;
    border: 1px solid #b8c1ce !important;
    box-shadow: none !important
}

.admin-main input[type=checkbox]:not(.sr-only) {
    border-radius: 6px !important
}

.admin-main input[type=radio]:not(.sr-only) {
    border-radius: 50% !important
}

.admin-main input[type=checkbox]:not(.sr-only):checked,
.admin-main input[type=radio]:not(.sr-only):checked {
    border-color: var(--primary-color) !important;
    background-color: var(--primary-color) !important
}

.admin-main .admin-search-enhanced {
    padding-left: 54px !important;
    padding-right: 46px !important
}

.admin-main .admin-search-enhancer-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #667085;
    font-size: 20px;
    pointer-events: none
}

.dark .admin-main input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dark .admin-main select,
.dark .admin-main textarea,
.dark .admin-main input[type=file] {
    border-color: #344054 !important;
    background: #101828 !important;
    color: #f8fafc !important
}

.admin-main .border-red-500,
.admin-main .is-invalid,
.admin-main [aria-invalid=true] {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important
}

.admin-main .is-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12) !important
}

.admin-main input:disabled,
.admin-main select:disabled,
.admin-main textarea:disabled,
.admin-main input[readonly],
.admin-main textarea[readonly] {
    border-color: #e2e8f0 !important;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    opacity: .75;
    box-shadow: none !important
}

.admin-search-control:focus-within>i {
    color: var(--primary-color)
}

/* Select2 visual styling bridge to match the 35px height, 5px border-radius, and font-weight 300 specs */
.select2-container--default .select2-selection--single {
    height: 35px !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 33px !important;
    padding-left: 10px !important;
    color: #111827 !important;
    font-family: Roboto, system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 300 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 33px !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-color) !important;
    outline: none !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent) !important;
}

/* Dark mode Select2 bridge */
.dark .select2-container--default .select2-selection--single {
    border-color: #344054 !important;
    background: #101828 !important;
}

.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #f8fafc !important;
}
