/* StaraTrace - Additional styles */
/* Main styles are inline in base.html template for simplicity */
/* Add any additional custom styles here */

/* Fix Django Select2 width issue without breaking layout */
.select2-container--admin-autocomplete {
    width: 100% !important;
}

.btn-dt-primary {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    border: 1px solid transparent;
    color: #fff !important;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.18);
    transition: all 0.2s ease;
}

.btn-dt-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(79, 70, 229, 0.24);
}

.btn-dt-secondary {
    background: #eef2ff;
    border: 1px solid #dbe5f1;
    color: #0f172a !important;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.btn-dt-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-dt-danger {
    background: linear-gradient(135deg, #dc2626, #f97316);
    border: 1px solid transparent;
    color: #fff !important;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.18);
    transition: all 0.2s ease;
}

.btn-dt-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(220, 38, 38, 0.24);
}

.dt-admin-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dt-admin-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 12px;
    border: 1px solid #dbe5f1;
    background: #fff;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dt-admin-action:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.dt-admin-action-view {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.dt-admin-action-view:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.dt-admin-action-edit {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}

.dt-admin-action-edit:hover {
    background: #e0e7ff;
    color: #4338ca;
}

/* Jazzmin related-object modal sizing */
.modal-wide .modal-dialog {
    width: min(1120px, 94vw);
    max-width: min(1120px, 94vw);
}

.modal-wide .modal-content {
    min-height: 70vh;
    overflow: hidden;
    border: 1px solid #dbe5f1;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
    background: #fff;
}

.modal-wide .modal-header {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.modal-wide .modal-title {
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.modal-wide .btn-close {
    padding: 0.9rem;
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    box-shadow: none;
    opacity: 1;
}

.modal-wide .btn-close:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.modal-wide .modal-body {
    padding: 0;
    overflow: hidden;
    background: #fff;
}

iframe.related-iframe {
    display: block;
    width: 100%;
    min-height: 70vh;
    height: 70vh;
    background: #fff;
}

body.popup {
    background: #fff !important;
}

body.popup .app-content {
    padding-top: 0;
}

body.popup .container-fluid {
    padding-right: 0;
    padding-left: 0;
}

body.popup #content,
body.popup #content-main {
    max-width: none;
    margin: 0;
    background: transparent;
}

body.popup .popup-admin-form {
    max-width: none;
    margin: 0;
    width: 100%;
    padding: 1.25rem 1.5rem 1.5rem;
    background: #fff;
    font-family: Inter, "Segoe UI", sans-serif;
}

body.popup .popup-admin-alert {
    border: 0;
    border-radius: 14px;
}

body.popup .popup-admin-fieldsets .nav-tabs {
    gap: 0.5rem;
    border-bottom: 0;
    margin-bottom: 1rem !important;
    overflow-x: auto;
    flex-wrap: nowrap;
}

body.popup .popup-admin-fieldsets .nav-tabs .nav-link {
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
}

body.popup .popup-admin-fieldsets .nav-tabs .nav-link.active {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

body.popup .popup-admin-fieldsets .tab-content > .tab-pane {
    padding: 0;
}

body.popup .popup-admin-fieldsets .tab-content,
body.popup .popup-admin-fieldsets .tab-pane,
body.popup .popup-admin-fieldsets .card {
    margin-bottom: 1.25rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

body.popup .popup-admin-fieldsets .card-header {
    padding: 0 0 0.7rem;
    border-bottom: 0;
    background: transparent;
}

body.popup .popup-admin-fieldsets .card-title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

body.popup .popup-admin-fieldsets .card-body,
body.popup .popup-admin-fieldsets .p-5 {
    padding: 0 !important;
}

body.popup .popup-admin-fieldsets .form-group {
    margin-bottom: 1rem;
}

body.popup .popup-admin-fieldsets .form-group .row {
    row-gap: 0.45rem;
}

body.popup .popup-admin-fieldsets .form-group label {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.popup .popup-admin-fieldsets .help-block,
body.popup .popup-admin-fieldsets .help,
body.popup .popup-admin-fieldsets .helptext {
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.82rem;
}

body.popup .popup-admin-fieldsets ul.errorlist {
    margin: 0.45rem 0 0;
    padding: 0;
    list-style: none;
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 600;
}

body.popup .popup-admin-fieldsets .readonly {
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 500;
}

body.popup .popup-admin-fieldsets .related-widget-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

body.popup .popup-admin-fieldsets .related-widget-wrapper > *:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

body.popup .popup-admin-fieldsets .related-widget-wrapper a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    text-decoration: none;
    transition: all 0.2s ease;
}

body.popup .popup-admin-fieldsets .related-widget-wrapper a:hover {
    border-color: #a5b4fc;
    background: #e0e7ff;
    color: #4338ca;
}

body.popup .popup-admin-fieldsets .select2-container,
body.popup .popup-admin-fieldsets .related-widget-wrapper,
body.popup .popup-admin-fieldsets .form-control,
body.popup .popup-admin-fieldsets .form-select {
    width: 100% !important;
}

body.popup .popup-admin-fieldsets input:not([type="checkbox"]):not([type="radio"]),
body.popup .popup-admin-fieldsets textarea,
body.popup .popup-admin-fieldsets select,
body.popup .popup-admin-fieldsets .vTextField,
body.popup .popup-admin-fieldsets .select2-selection--single,
body.popup .popup-admin-fieldsets .select2-selection--multiple {
    min-height: 3rem;
    border: 1px solid #dbe5f1 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body.popup .popup-admin-fieldsets textarea {
    min-height: 8rem;
}

body.popup .popup-admin-fieldsets .select2-selection--single {
    display: flex !important;
    align-items: center;
    padding: 0.35rem 0.85rem !important;
}

body.popup .popup-admin-fieldsets input:not([type="checkbox"]):not([type="radio"]):focus,
body.popup .popup-admin-fieldsets textarea:focus,
body.popup .popup-admin-fieldsets select:focus,
body.popup .popup-admin-fieldsets .select2-container--focus .select2-selection--single,
body.popup .popup-admin-fieldsets .select2-container--open .select2-selection--single,
body.popup .popup-admin-fieldsets .select2-container--focus .select2-selection--multiple,
body.popup .popup-admin-fieldsets .select2-container--open .select2-selection--multiple {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14) !important;
}

body.popup .popup-admin-fieldsets .popup-admin-view-mode {
    position: relative;
}

body.popup .popup-admin-fieldsets.popup-admin-view-mode .select2-container,
body.popup .popup-admin-fieldsets.popup-admin-view-mode input,
body.popup .popup-admin-fieldsets.popup-admin-view-mode textarea,
body.popup .popup-admin-fieldsets.popup-admin-view-mode select {
    pointer-events: none;
}

body.popup .popup-admin-fieldsets.popup-admin-view-mode .select2-container,
body.popup .popup-admin-fieldsets.popup-admin-view-mode input,
body.popup .popup-admin-fieldsets.popup-admin-view-mode textarea,
body.popup .popup-admin-fieldsets.popup-admin-view-mode select,
body.popup .popup-admin-fieldsets.popup-admin-view-mode .readonly {
    opacity: 0.8;
}

body.popup .popup-admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

body.popup .popup-admin-fieldsets .selector {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

body.popup .popup-admin-fieldsets .selector-available,
body.popup .popup-admin-fieldsets .selector-chosen {
    min-width: 0;
    border: 1px solid #dbe5f1;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

body.popup .popup-admin-fieldsets .selector-available-title,
body.popup .popup-admin-fieldsets .selector-chosen-title {
    padding: 0.95rem 1rem;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: #334155;
    font-weight: 700;
}

body.popup .popup-admin-fieldsets .selector .selector-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fbff;
}

body.popup .popup-admin-fieldsets .selector .selector-filter label {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0;
}

body.popup .popup-admin-fieldsets .selector select {
    min-height: 18rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.popup .popup-admin-fieldsets .selector ul.selector-chooser {
    display: grid;
    gap: 0.75rem;
    align-self: center;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    transform: none;
}

body.popup .popup-admin-fieldsets .selector-chooser li {
    padding: 0;
}

body.popup .popup-admin-fieldsets .selector-add,
body.popup .popup-admin-fieldsets .selector-remove {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    background: #eef2ff;
    background-image: none;
    color: transparent;
    text-indent: 0;
}

body.popup .popup-admin-fieldsets .selector-add::before,
body.popup .popup-admin-fieldsets .selector-remove::before {
    color: #4f46e5;
    font-size: 2rem;
    line-height: 1;
}

body.popup .popup-admin-fieldsets .selector-add::before {
    content: "\203A";
}

body.popup .popup-admin-fieldsets .selector-remove::before {
    content: "\2039";
}

body.popup .popup-admin-fieldsets .selector-chooseall,
body.popup .popup-admin-fieldsets .selector-clearall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    margin-top: 0.85rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #dbe5f1;
    border-radius: 14px;
    background: #eef2ff;
    background-image: none;
    color: #4338ca;
    font-weight: 700;
    text-decoration: none;
}

body.popup .popup-admin-fieldsets .selector .helptext,
body.popup .popup-admin-fieldsets .help.help-tooltip {
    margin-top: 0.85rem;
}

/* Compact, app-like layout for project membership popup */
body.popup .projectmembership-popup-form {
    max-width: none;
    margin: 0;
    width: 100%;
    padding: 1.25rem 1.5rem 1.5rem;
    background: #fff;
    font-family: Inter, "Segoe UI", sans-serif;
}

body.popup .projectmembership-popup-fields {
    display: grid;
    gap: 1rem;
}

body.popup .projectmembership-popup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

body.popup .projectmembership-popup-field label {
    display: block;
    margin-bottom: 0.45rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.popup .projectmembership-popup-form .related-widget-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

body.popup .projectmembership-popup-form .related-widget-wrapper > *:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

body.popup .projectmembership-popup-form .related-widget-wrapper a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    text-decoration: none;
    transition: all 0.2s ease;
}

body.popup .projectmembership-popup-form .related-widget-wrapper a:hover {
    border-color: #a5b4fc;
    background: #e0e7ff;
    color: #4338ca;
}

body.popup .projectmembership-popup-form .select2-container,
body.popup .projectmembership-popup-form .related-widget-wrapper,
body.popup .projectmembership-popup-form .form-control,
body.popup .projectmembership-popup-form .form-select {
    width: 100% !important;
}

body.popup .projectmembership-popup-form .vTextField,
body.popup .projectmembership-popup-form .form-control,
body.popup .projectmembership-popup-form .form-select,
body.popup .projectmembership-popup-form .select2-selection--single {
    min-height: 3rem;
    border: 1px solid #dbe5f1 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body.popup .projectmembership-popup-form .select2-selection--single {
    display: flex !important;
    align-items: center;
    padding: 0.35rem 0.85rem !important;
}

body.popup .projectmembership-popup-form .vTextField:focus,
body.popup .projectmembership-popup-form .form-control:focus,
body.popup .projectmembership-popup-form .form-select:focus,
body.popup .projectmembership-popup-form .select2-container--focus .select2-selection--single,
body.popup .projectmembership-popup-form .select2-container--open .select2-selection--single {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14) !important;
}

body.popup .projectmembership-popup-readonly {
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 500;
}

body.popup .projectmembership-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

body.popup .projectmembership-status-badge.is-active {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

body.popup .projectmembership-status-badge.is-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

body.popup .projectmembership-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dbe5f1;
    border-radius: 14px;
    background: #f8fafc;
}

body.popup .projectmembership-toggle input {
    width: 1.1rem;
    height: 1.1rem;
}

body.popup .projectmembership-toggle-text {
    color: #0f172a;
    font-weight: 600;
}

body.popup .projectmembership-popup-help {
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.82rem;
}

body.popup .projectmembership-popup-error {
    margin-top: 0.4rem;
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 600;
}

body.popup .projectmembership-popup-alert {
    border: 0;
    border-radius: 14px;
}

body.popup .projectmembership-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    body.popup .popup-admin-form {
        padding: 1rem;
    }

    body.popup .popup-admin-fieldsets .card-body,
    body.popup .popup-admin-fieldsets .p-5 {
        padding: 0 !important;
    }

    body.popup .projectmembership-popup-form {
        padding: 1rem;
    }

    body.popup .projectmembership-popup-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin inquiry surfaces */
body:not(.popup).change-list {
    font-family: Inter, "Segoe UI", sans-serif;
}

body:not(.popup).change-form {
    font-family: Inter, "Segoe UI", sans-serif;
}

body:not(.popup).change-list .content-wrapper,
body:not(.popup).change-list .content-wrapper > .content,
body:not(.popup).change-list .app-content,
body:not(.popup).change-form .content-wrapper,
body:not(.popup).change-form .content-wrapper > .content,
body:not(.popup).change-form .app-content {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 28%),
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4f8 100%);
}

body:not(.popup).change-list .content-header {
    padding-bottom: 0.75rem;
}

body:not(.popup).change-list .content-header h1,
body:not(.popup).change-form .content-header h1 {
    color: #0f172a;
    font-size: clamp(2rem, 2.6vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

body:not(.popup).change-list .breadcrumb,
body:not(.popup).change-form .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0;
    background: transparent;
    color: #64748b;
    font-weight: 500;
}

body:not(.popup).change-list .breadcrumb-item + .breadcrumb-item::before,
body:not(.popup).change-form .breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}

body:not(.popup).change-list .breadcrumb-item a,
body:not(.popup).change-form .breadcrumb-item a {
    color: #2563eb;
    text-decoration: none;
}

body:not(.popup).change-list .dt-admin-page-actions .btn,
body:not(.popup).change-list .dt-admin-add-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3.2rem;
    padding: 0.85rem 1.3rem;
    border-radius: 16px;
    text-decoration: none;
}

body:not(.popup).change-list .dt-admin-header-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}

body:not(.popup).change-list .dt-admin-list-shell {
    display: grid;
    gap: 1rem;
}

body:not(.popup).change-list .dt-admin-toolbar {
    padding: 1rem 1.15rem;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

body:not(.popup).change-list .dt-admin-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

body:not(.popup).change-list .dt-admin-toolbar-fields {
    display: flex;
    flex: 1 1 42rem;
    flex-wrap: wrap;
    gap: 0.85rem;
}

body:not(.popup).change-list .dt-admin-filter-field {
    flex: 1 1 12rem;
    min-width: 12rem;
    margin-bottom: 0;
}

body:not(.popup).change-list .dt-admin-search-field {
    position: relative;
    flex: 1 1 18rem;
    min-width: 18rem;
}

body:not(.popup).change-list .dt-admin-search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 2;
    color: #94a3b8;
    transform: translateY(-50%);
}

body:not(.popup).change-list .dt-admin-search-field .form-control,
body:not(.popup).change-list .dt-admin-filter-select,
body:not(.popup).change-list .dt-admin-toolbar .select2-selection--single,
body:not(.popup).change-list .dt-admin-actions .select2-selection--single {
    min-height: 3.2rem;
    border: 1px solid #dbe5f1 !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body:not(.popup).change-list .dt-admin-search-field .form-control {
    padding-left: 2.75rem;
}

body:not(.popup).change-list .dt-admin-toolbar .select2-container,
body:not(.popup).change-list .dt-admin-actions .select2-container {
    width: 100% !important;
}

body:not(.popup).change-list .dt-admin-toolbar .select2-selection--single,
body:not(.popup).change-list .dt-admin-actions .select2-selection--single {
    display: flex !important;
    align-items: center;
    padding: 0.35rem 0.9rem !important;
}

body:not(.popup).change-list .dt-admin-toolbar .select2-selection__rendered,
body:not(.popup).change-list .dt-admin-actions .select2-selection__rendered {
    padding-left: 0 !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
}

body:not(.popup).change-list .dt-admin-toolbar .select2-selection__arrow,
body:not(.popup).change-list .dt-admin-actions .select2-selection__arrow {
    height: 100% !important;
    right: 0.65rem !important;
}

body:not(.popup).change-list .dt-admin-search-field .form-control:focus,
body:not(.popup).change-list .dt-admin-toolbar .select2-container--focus .select2-selection--single,
body:not(.popup).change-list .dt-admin-toolbar .select2-container--open .select2-selection--single,
body:not(.popup).change-list .dt-admin-actions .select2-container--focus .select2-selection--single,
body:not(.popup).change-list .dt-admin-actions .select2-container--open .select2-selection--single {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14) !important;
}

body:not(.popup).change-list .dt-admin-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

body:not(.popup).change-list .dt-admin-toolbar-submit {
    min-height: 3.2rem;
    padding-inline: 1.35rem;
}

body:not(.popup).change-list .dt-admin-toolbar-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 3.2rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    background: #fff;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 600;
}

body:not(.popup).change-list .dt-admin-toolbar-meta a {
    color: #2563eb;
    text-decoration: none;
}

body:not(.popup).change-list .dt-admin-list-alert {
    border-radius: 18px;
}

body:not(.popup).change-list .dt-admin-bulk-bar {
    margin-bottom: 1rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.04);
}

body:not(.popup).change-list .dt-admin-bulk-bar-bottom {
    margin-top: 1rem;
    margin-bottom: 0;
}

body:not(.popup).change-list .dt-admin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

body:not(.popup).change-list .dt-admin-actions-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

body:not(.popup).change-list .dt-admin-actions-label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    color: #475569;
    font-weight: 600;
}

body:not(.popup).change-list .dt-admin-actions select {
    min-width: 16rem;
}

body:not(.popup).change-list .dt-admin-actions-submit {
    min-height: 2.85rem;
    padding-inline: 1.1rem;
}

body:not(.popup).change-list .dt-admin-actions-counter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: #475569;
    font-weight: 600;
}

body:not(.popup).change-list .dt-admin-actions-counter a {
    color: #2563eb;
    text-decoration: none;
}

body:not(.popup).change-list .dt-admin-table-card {
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

body:not(.popup).change-list .dt-admin-results-table {
    margin-bottom: 0;
}

body:not(.popup).change-list .dt-admin-results-table thead th {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
}

body:not(.popup).change-list .dt-admin-results-table thead th .text {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

body:not(.popup).change-list .dt-admin-results-table thead th a,
body:not(.popup).change-list .dt-admin-results-table thead th span {
    color: #0f172a;
    text-decoration: none;
}

body:not(.popup).change-list .dt-admin-sort-clear {
    color: #94a3b8 !important;
}

body:not(.popup).change-list .dt-admin-results-table tbody td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eef2f7;
    background: transparent;
    color: #1e293b;
    vertical-align: middle;
}

body:not(.popup).change-list .dt-admin-results-table tbody tr:nth-child(odd) td {
    background: rgba(248, 250, 252, 0.84);
}

body:not(.popup).change-list .dt-admin-results-table tbody tr:hover td {
    background: rgba(239, 246, 255, 0.95);
}

body:not(.popup).change-list .dt-admin-results-table tbody td a:not(.dt-admin-action) {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

body:not(.popup).change-list .dt-admin-results-table tbody td a:not(.dt-admin-action):hover {
    color: #2563eb;
}

body:not(.popup).change-list .dt-admin-results-table .field-popup_actions {
    white-space: nowrap;
}

body:not(.popup).change-form .dt-admin-form-shell {
    width: 100%;
}

body:not(.popup).change-form .dt-admin-form-layout {
    row-gap: 1rem;
}

body:not(.popup).change-form .dt-admin-form-panel {
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

body:not(.popup).change-form .dt-admin-form-stage-body {
    padding: 1.35rem 1.5rem;
}

body:not(.popup).change-form .dt-admin-form-stage .card,
body:not(.popup).change-form .dt-admin-form-stage .card-body {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body:not(.popup).change-form .dt-admin-form-stage .card-body {
    padding: 0;
}

body:not(.popup).change-form .dt-admin-form-stage .nav-tabs {
    gap: 0.5rem;
    border-bottom: 0;
    margin-bottom: 1rem !important;
    overflow-x: auto;
    flex-wrap: nowrap;
}

body:not(.popup).change-form .dt-admin-form-stage .nav-tabs .nav-link {
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
}

body:not(.popup).change-form .dt-admin-form-stage .nav-tabs .nav-link.active {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

body:not(.popup).change-form .dt-admin-form-stage .form-group {
    margin-bottom: 1rem;
}

body:not(.popup).change-form .dt-admin-form-stage .form-group .row {
    row-gap: 0.45rem;
}

body:not(.popup).change-form .dt-admin-form-stage label {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body:not(.popup).change-form .dt-admin-form-stage .help-block,
body:not(.popup).change-form .dt-admin-form-stage .help,
body:not(.popup).change-form .dt-admin-form-stage .helptext {
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.82rem;
}

body:not(.popup).change-form .dt-admin-form-stage ul.errorlist {
    margin: 0.45rem 0 0;
    padding: 0;
    list-style: none;
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 600;
}

body:not(.popup).change-form .dt-admin-form-stage .readonly {
    min-height: 3rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 500;
}

body:not(.popup).change-form .dt-admin-form-stage .related-widget-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

body:not(.popup).change-form .dt-admin-form-stage .related-widget-wrapper > *:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

body:not(.popup).change-form .dt-admin-form-stage .related-widget-wrapper a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    text-decoration: none;
    transition: all 0.2s ease;
}

body:not(.popup).change-form .dt-admin-form-stage .related-widget-wrapper a:hover {
    border-color: #a5b4fc;
    background: #e0e7ff;
    color: #4338ca;
}

body:not(.popup).change-form .dt-admin-form-stage .select2-container,
body:not(.popup).change-form .dt-admin-form-stage .related-widget-wrapper,
body:not(.popup).change-form .dt-admin-form-stage .form-control,
body:not(.popup).change-form .dt-admin-form-stage .form-select {
    width: 100% !important;
}

body:not(.popup).change-form .dt-admin-form-stage input:not([type="checkbox"]):not([type="radio"]),
body:not(.popup).change-form .dt-admin-form-stage textarea,
body:not(.popup).change-form .dt-admin-form-stage select,
body:not(.popup).change-form .dt-admin-form-stage .vTextField,
body:not(.popup).change-form .dt-admin-form-stage .select2-selection--single,
body:not(.popup).change-form .dt-admin-form-stage .select2-selection--multiple {
    min-height: 3rem;
    border: 1px solid #dbe5f1 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body:not(.popup).change-form .dt-admin-form-stage textarea {
    min-height: 8rem;
}

body:not(.popup).change-form .dt-admin-form-stage .select2-selection--single {
    display: flex !important;
    align-items: center;
    padding: 0.35rem 0.85rem !important;
}

body:not(.popup).change-form .dt-admin-form-stage input:not([type="checkbox"]):not([type="radio"]):focus,
body:not(.popup).change-form .dt-admin-form-stage textarea:focus,
body:not(.popup).change-form .dt-admin-form-stage select:focus,
body:not(.popup).change-form .dt-admin-form-stage .select2-container--focus .select2-selection--single,
body:not(.popup).change-form .dt-admin-form-stage .select2-container--open .select2-selection--single,
body:not(.popup).change-form .dt-admin-form-stage .select2-container--focus .select2-selection--multiple,
body:not(.popup).change-form .dt-admin-form-stage .select2-container--open .select2-selection--multiple {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14) !important;
}

body:not(.popup).change-form .dt-admin-form-actions-panel {
    padding: 1.1rem;
}

body:not(.popup).change-form .dt-admin-form-actions-body {
    display: grid;
    gap: 0.9rem;
}

body:not(.popup).change-form .dt-admin-submit-stack {
    display: grid;
    gap: 0.75rem;
}

body:not(.popup).change-form .dt-admin-submit-button,
body:not(.popup).change-form .dt-admin-side-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    text-decoration: none;
}

body:not(.popup).change-form .dt-admin-form-tools {
    display: grid;
    gap: 0.75rem;
}

body:not(.popup).change-form .selector,
body.popup .popup-admin-fieldsets .selector {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    width: 100%;
}

body:not(.popup).change-form .selector-available,
body:not(.popup).change-form .selector-chosen,
body.popup .popup-admin-fieldsets .selector-available,
body.popup .popup-admin-fieldsets .selector-chosen {
    min-width: 0;
    border: 1px solid #dbe5f1;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

body:not(.popup).change-form .selector-available-title,
body:not(.popup).change-form .selector-chosen-title,
body.popup .popup-admin-fieldsets .selector-available-title,
body.popup .popup-admin-fieldsets .selector-chosen-title {
    padding: 0.95rem 1rem;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: #334155;
    font-weight: 700;
}

body:not(.popup).change-form .selector .selector-filter,
body.popup .popup-admin-fieldsets .selector .selector-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fbff;
}

body:not(.popup).change-form .selector .selector-filter label,
body.popup .popup-admin-fieldsets .selector .selector-filter label {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0;
}

body:not(.popup).change-form .selector select,
body.popup .popup-admin-fieldsets .selector select {
    min-height: 18rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

body:not(.popup).change-form .selector ul.selector-chooser,
body.popup .popup-admin-fieldsets .selector ul.selector-chooser {
    display: grid;
    gap: 0.75rem;
    align-self: center;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    transform: none;
}

body:not(.popup).change-form .selector-chooser li,
body.popup .popup-admin-fieldsets .selector-chooser li {
    padding: 0;
}

body:not(.popup).change-form .selector-add,
body:not(.popup).change-form .selector-remove,
body.popup .popup-admin-fieldsets .selector-add,
body.popup .popup-admin-fieldsets .selector-remove {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    background: #eef2ff;
    background-image: none;
    color: transparent;
    text-indent: 0;
}

body:not(.popup).change-form .selector-add::before,
body:not(.popup).change-form .selector-remove::before,
body.popup .popup-admin-fieldsets .selector-add::before,
body.popup .popup-admin-fieldsets .selector-remove::before {
    color: #4f46e5;
    font-size: 2rem;
    line-height: 1;
}

body:not(.popup).change-form .selector-add::before,
body.popup .popup-admin-fieldsets .selector-add::before {
    content: "\203A";
}

body:not(.popup).change-form .selector-remove::before,
body.popup .popup-admin-fieldsets .selector-remove::before {
    content: "\2039";
}

body:not(.popup).change-form .selector-chooseall,
body:not(.popup).change-form .selector-clearall,
body.popup .popup-admin-fieldsets .selector-chooseall,
body.popup .popup-admin-fieldsets .selector-clearall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    margin-top: 0.85rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #dbe5f1;
    border-radius: 14px;
    background: #eef2ff;
    background-image: none;
    color: #4338ca;
    font-weight: 700;
    text-decoration: none;
}

body:not(.popup).change-form .selector .helptext,
body.popup .popup-admin-fieldsets .selector .helptext {
    color: #64748b;
    font-size: 0.82rem;
}

body:not(.popup).change-list .dt-admin-empty-state {
    display: grid;
    place-items: center;
    gap: 0.8rem;
    padding: 3rem 1.5rem;
    text-align: center;
}

body:not(.popup).change-list .dt-admin-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    color: #2563eb;
    font-size: 1.35rem;
}

body:not(.popup).change-list .dt-admin-empty-state h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

body:not(.popup).change-list .dt-admin-empty-state p {
    max-width: 32rem;
    margin: 0;
    color: #64748b;
}

body:not(.popup).change-list .dt-admin-pagination {
    margin-top: 1rem;
}

body:not(.popup).change-list .dt-admin-pagination .paginator {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding: 0.95rem 1.1rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.04);
}

body:not(.popup).change-list .dt-admin-pagination .paginator a,
body:not(.popup).change-list .dt-admin-pagination .paginator .this-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
}

body:not(.popup).change-list .dt-admin-pagination .paginator a {
    background: #fff;
    border: 1px solid #dbe5f1;
    color: #334155;
}

body:not(.popup).change-list .dt-admin-pagination .paginator a:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

body:not(.popup).change-list .dt-admin-pagination .paginator .this-page {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: #fff;
    box-shadow: 0 10px 18px rgba(79, 70, 229, 0.18);
}

@media (max-width: 991px) {
    body:not(.popup).change-list .dt-admin-toolbar-actions,
    body:not(.popup).change-list .dt-admin-page-actions,
    body:not(.popup).change-list .dt-admin-header-tools {
        justify-content: flex-start !important;
    }
}

@media (max-width: 768px) {
    body:not(.popup).change-list .dt-admin-toolbar,
    body:not(.popup).change-list .dt-admin-bulk-bar,
    body:not(.popup).change-list .dt-admin-pagination .paginator {
        padding: 0.9rem;
        border-radius: 18px;
    }

    body:not(.popup).change-list .dt-admin-filter-field,
    body:not(.popup).change-list .dt-admin-search-field {
        min-width: 100%;
    }

    body:not(.popup).change-list .dt-admin-actions-label,
    body:not(.popup).change-list .dt-admin-actions-main,
    body:not(.popup).change-list .dt-admin-actions-counter {
        width: 100%;
    }

    body:not(.popup).change-list .dt-admin-actions select {
        min-width: 100%;
    }

    body:not(.popup).change-list .dt-admin-results-table thead th,
    body:not(.popup).change-list .dt-admin-results-table tbody td {
        padding: 0.85rem 0.9rem;
    }

    body:not(.popup).change-form .dt-admin-form-stage-body,
    body:not(.popup).change-form .dt-admin-form-actions-panel {
        padding: 1rem;
    }

    body:not(.popup).change-form .selector,
    body.popup .popup-admin-fieldsets .selector {
        grid-template-columns: 1fr;
    }

    body:not(.popup).change-form .selector ul.selector-chooser,
    body.popup .popup-admin-fieldsets .selector ul.selector-chooser {
        display: flex;
        justify-content: center;
    }
}
