/* Utility Classes matching Bootstrap naming */
.text-center {
    text-align: center !important;
}

.text-primary {
    color: var(--status-primary) !important;
}

.text-danger {
    color: var(--status-danger) !important;
}

.text-muted {
    color: var(--status-muted) !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.text-decoration-underline {
    text-decoration: underline !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.small {
    font-size: 0.875rem !important;
}

/* Spacing */
.m-0 {
    margin: 0 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.ms-3 {
    margin-left: 1rem !important;
}

.ms-4 {
    margin-left: 1.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-5 {
    padding: 3rem !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.px-5 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

.pt-4 {
    padding-top: 1.5rem !important;
}

.d-grid {
    display: grid !important;
}

.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.border-top {
    border-top: 1px solid var(--border-color) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--border-color) !important;
}

.border-end {
    border-right: 1px solid var(--border-color) !important;
}

.pb-3 {
    padding-bottom: 1rem !important;
}

/* Grid System (Minimal) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.row>* {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.g-2 {
    margin-right: -0.25rem;
    margin-left: -0.25rem;
}

.g-2>* {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
}

.g-3 {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.g-3>* {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

@media (min-width: 768px) {
    .col-md-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-md-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .col-md-5 {
        flex: 0 0 auto;
        width: 41.666667%;
    }

    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }

    .col-md-7 {
        flex: 0 0 auto;
        width: 58.333333%;
    }

    .col-md-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-sm {
    padding: .25rem .5rem;
    font-size: .875rem;
    border-radius: .2rem;
}

.btn-primary {
    color: var(--bg-white);
    background-color: var(--status-primary);
    border-color: var(--status-primary);
}

.btn-primary:hover {
    color: var(--bg-white);
    background-color: var(--status-primary-hover);
    border-color: var(--status-primary-dark);
}

.btn-success {
    color: var(--bg-white);
    background-color: var(--status-success);
    border-color: var(--status-success);
}

.btn-success:hover {
    color: var(--bg-white);
    background-color: var(--status-success-hover);
    border-color: var(--status-success-dark);
}

.btn-danger {
    color: var(--bg-white);
    background-color: var(--status-danger);
    border-color: var(--status-danger);
}

.btn-danger:hover {
    color: var(--bg-white);
    background-color: var(--status-danger-hover);
    border-color: var(--status-danger-dark);
}

.btn-secondary {
    color: var(--bg-white);
    background-color: var(--status-muted);
    border-color: var(--status-muted);
}

.btn-secondary:hover {
    color: var(--bg-white);
    background-color: var(--status-muted-hover);
    border-color: var(--status-muted-dark);
}

.btn-lg {
    padding: .5rem 1rem;
    font-size: 1.25rem;
    border-radius: .3rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.w-100 {
    width: 100% !important;
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

.alert-success {
    color: var(--status-success-dark);
    background-color: var(--status-success-bg);
    border-color: var(--status-success-subtle);
}

.alert-info {
    color: var(--status-info-dark);
    background-color: var(--status-info-bg);
    border-color: var(--status-info-subtle);
}

.bg-light {
    background-color: var(--bg-light) !important;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-main);
    vertical-align: top;
    border-color: var(--border-color);
    border-collapse: collapse;
}

.table-bordered {
    border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
    padding: 0.25rem;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    --bs-table-accent-bg: rgba(0, 0, 0, 0.05);
    color: var(--bs-table-striped-color);
}

.alert-heading {
    color: inherit;
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 500;
    line-height: 1.2;
    font-size: 1.5rem;
}

/* Form Controls */
.form-label {
    margin-bottom: .5rem;
    display: inline-block;
}

.form-control-sm {
    min-height: calc(1.5em + .5rem + 2px);
    padding: .25rem .5rem;
    font-size: .875rem;
    border-radius: .2rem;
}



/* Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}

.page-link {
    position: relative;
    display: block;
    color: var(--status-primary);
    text-decoration: none;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    padding: .375rem .75rem;
}

.page-link:hover {
    z-index: 2;
    color: var(--status-primary-dark);
    background-color: var(--bg-subtle);
    border-color: var(--border-color);
}

.page-link:focus {
    z-index: 3;
    color: var(--status-primary-dark);
    background-color: var(--bg-subtle);
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}

.page-item:not(:first-child) .page-link {
    margin-left: -1px;
}

.page-item.active .page-link {
    z-index: 3;
    color: var(--bg-white) !important;
    background-color: var(--status-primary) !important;
    border-color: var(--status-primary) !important;
}

.page-item.disabled .page-link {
    color: var(--status-muted);
    pointer-events: none;
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

.page-item:first-child .page-link {
    border-top-left-radius: .25rem;
    border-bottom-left-radius: .25rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: .25rem;
    border-bottom-right-radius: .25rem;
}

.position-relative {
    position: relative !important;
}

/* Visibility Control */
.visibility-control {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    margin-top: 0.25rem;
}

.visibility-control-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    display: block;
    margin-bottom: 0.25rem;
}

.visibility-check-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.visibility-check-item {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
}


/* Field Group Boxing */
.field-box {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-box:hover {
    border-color: #ced4da;
}

.field-box:focus-within {
    border-color: var(--status-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.05);
}

.field-box label {
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: block;
    color: #495057;
}

.field-box .visibility-control {
    margin-top: 0.75rem;
    border-style: dashed;
    background-color: #fcfcfc;
}