.form-control.is-invalid,
.was-validated .form-control:invalid,
.form-select.is-invalid,
.was-validated .form-select:invalid {
    background-image: none !important;
}



.perm-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 10px;
    position: relative;
    transition: all 0.25s ease;
}

.perm-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.perm-check-box {
    width: 15px;
    height: 15px;
    min-width: 15px;
    border: 1px solid #40516C;
    border-radius: 0;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
    box-sizing: border-box;
}

.perm-check-box svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.2s ease;
}

.perm-check-label:hover .perm-check-box {
    border-color: #3a4d6b;
    box-shadow: 0 0 0 4px rgba(64, 81, 108, 0.08);
    transform: translateY(-1px);
}

.perm-check-input:checked+.perm-check-box {
    background: #40516C;
    border-color: #40516C;
}

.perm-check-input:checked+.perm-check-box svg {
    opacity: 1;
    transform: scale(1);
}

.perm-check-input:focus-visible+.perm-check-box {
    box-shadow: 0 0 0 4px rgba(64, 81, 108, 0.14);
}

.perm-check-text {
    font-size: 14px;
    font-weight: 500;
    color: #40516C;
}

.perm-check-label:hover .perm-check-text {
    color: #40516C;
}

.perm-check-input:checked~.perm-check-text {
    color: #334155;
}



/* Modal styles */
.modal-overlay {
    display: none;
    overflow-y: auto;
    position: fixed;
    inset: 0;
    z-index: 50;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    transition-duration: 300ms;
}

@media (min-width: 640px) {
    .modal-overlay {
        padding: 1.25rem;
    }
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    margin: auto;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.2s ease-out;
}

/* Small */
.modal-sm {
    max-width: 400px;
}

/* Medium (optional override if needed) */
.modal-md {
    max-width: 600px;
}

/* Large */
.modal-lg {
    max-width: 900px;
}

/* Extra Large */
.modal-xl {
    max-width: 1140px;
}

/* Full width (optional bonus) */
.modal-full {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
}

.modal-header {
    display: flex;
    padding: 1rem;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 4px 12px 0px rgb(0 0 0 / 10%);
}

@media (min-width: 640px) {
    .modal-header {
        padding: 1.25rem;
    }
}

.modal-header h2 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: #40516c;
}

.close-modal-icon {
    transition: transform 0.3s ease-in-out;
}

.btn-close-modal:hover .close-modal-icon {
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.btn-close-modal {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

/* Actions dropdown */
.actions-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    width: 140px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    /* padding: 6px 0; */
    overflow: hidden;
    z-index: 50;
    display: none;
}

.actions-dropdown.show {
    display: block;
}

.actions-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    transition: background 0.15s;
}

.actions-dropdown a:hover {
    background: #707c91;
    color: #fff;
}

.actions-dropdown a:hover svg {
    filter: invert(1);
}

#supportTable .actions-dropdown a:hover svg{
    filter: none;
}

.actions-dropdown a.danger {
    color: #dc2626;
}

.actions-dropdown a.danger:hover {
    background: #fef2f2;
}