/* DJANGO ADMIN CONTENT VISIBILITY OVERRIDES */

/* Hide breadcrumbs completely */
html body .breadcrumbs,
body .breadcrumbs,
.breadcrumbs,
html body div.breadcrumbs,
body div.breadcrumbs,
div.breadcrumbs,
html body #breadcrumbs,
body #breadcrumbs,
#breadcrumbs {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    transform: scale(0) !important;
    filter: blur(10px) !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    border: none !important;
    background: transparent !important;
}

/* Hide navigation sidebar */
html body #nav-sidebar,
body #nav-sidebar,
#nav-sidebar,
html body #toggle-nav-sidebar,
body #toggle-nav-sidebar,
#toggle-nav-sidebar,
html body .nav-sidebar,
body .nav-sidebar,
.nav-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    transform: scale(0) !important;
    filter: blur(10px) !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* CRITICAL: Ensure main content area is visible (exclude login page) */
html body:not(.login) .main > .content,
body:not(.login) .main > .content,
body:not(.login) .main > .content,
html body:not(.login) #content,
body:not(.login) #content,
body:not(.login) #content {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 20px !important;
    margin-right: 0 !important;
    padding-right: 20px !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    display: block !important;
}

/* CRITICAL: Ensure main#content-start.content has proper padding-left (exclude login page) */
/* Only apply to PS and hxfilter-with-tags pages */
html body:not(.login) main#content-start.content,
body:not(.login) main#content-start.content,
body:not(.login) main#content-start.content {
    padding-left: 250px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 20px !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    display: block !important;
}

/* Reset padding for login page */
html body.login main#content-start.content,
body.login main#content-start.content,
body.login main#content-start.content {
    padding-left: 0 !important;
}

/* CRITICAL: Ensure content-main is visible */
html body #content-main,
body #content-main,
#content-main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
    overflow: visible !important;
    margin-top: 10px !important;
    padding-top: 0 !important;
}

/* CRITICAL: Ensure changelist is visible */
html body #changelist,
body #changelist,
#changelist,
html body .changelist,
body .changelist,
.changelist {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
    overflow: visible !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* CRITICAL: Ensure changelist-form-container is visible */
html body .changelist-form-container,
body .changelist-form-container,
.changelist-form-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
    overflow: visible !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* CRITICAL: Ensure changelist-form is visible */
html body #changelist-form,
body #changelist-form,
#changelist-form {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
    overflow: visible !important;
}

/* CRITICAL: Ensure results table is visible */
html body #result_list,
body #result_list,
#result_list,
html body .results,
body .results,
.results {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    position: static !important;
    overflow: visible !important;
}

/* CRITICAL: Ensure all tables are visible */
html body table,
body table,
table {
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    border-collapse: collapse !important;
    position: static !important;
    overflow: visible !important;
}

/* CRITICAL: Ensure table headers are visible */
html body table thead,
body table thead,
table thead,
html body table th,
body table th,
table th {
    display: table-header-group !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
}

/* CRITICAL: Ensure table bodies are visible */
html body table tbody,
body table tbody,
table tbody,
html body table td,
body table td,
table td {
    display: table-row-group !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
}

/* CRITICAL: Ensure table rows are visible */
html body table tr,
body table tr,
table tr {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
}

/* CRITICAL: Ensure table cells are visible */
html body table th,
body table th,
table th,
html body table td,
body table td,
table td {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    overflow: visible !important;
    padding: 8px !important;
    border: 0px solid #ddd !important;
}

/* Hide app list on index page */
html body .app-list,
body .app-list,
.app-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    transform: scale(0) !important;
    filter: blur(10px) !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Hide change-list filter in Tags and QU views */
/* Target only the filter sidebar, not the main content */
.admin-core-tag .changelist-form-container .changelist-form .module.filtered,
.admin-core-qu .changelist-form-container .changelist-form .module.filtered,
.admin-core-tag #changelist-form .module.filtered,
.admin-core-qu #changelist-form .module.filtered,
.admin-core-tag .changelist .module.filtered,
.admin-core-qu .changelist .module.filtered,
.admin-core-tag #changelist .module.filtered,
.admin-core-qu #changelist .module.filtered {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    transform: scale(0) !important;
    filter: blur(10px) !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Hide the changelist-filter div in Tags and QU views - SIMPLE AND TARGETED */
.admin-core-tag #changelist-filter,
.admin-core-qu #changelist-filter {
    display: none !important;
}

/* Note: Header search functionality is handled by JavaScript in base_site.html */

/* Hide original search forms that appear before changelist-form */
.changelist-form-container .search-form,
.changelist-form-container #header-search-form,
.changelist-form-container form[method="get"]:not(.changelist-form),
.changelist-form-container .module:has(.search-form),
.changelist-form-container .object-tools + .search-form {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Hide actions div in all views */
.actions {
    display: none !important;
}

/* Show object tools and add links */
.object-tools,
.object-tools *,
.addlink,
.object-tools .addlink,
.object-tools a[href*="/add/"],
.object-tools a[href*="add/"],
.object-tools a.addlink,
.object-tools li a,
.object-tools ul,
.object-tools li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    border: inherit !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    z-index: auto !important;
}

/* ===== FIXED HEADER COMPENSATION FOR QU AND TAG ADMIN ===== */
/* Ensure QU and Tag admin content-start has proper top margin to account for fixed header */
.admin-core-qu #content-start,
.admin-core-tag #content-start,
.admin-core-qu .content-start,
.admin-core-tag .content-start {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}


/* Ensure QU and Tag admin content-main has proper top margin to account for fixed header */
.admin-core-qu #content-main,
.admin-core-tag #content-main {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Alternative selectors for QU and Tag admin */
html body.app-core.model-qu.change-list #content-main,
html body.app-core.model-tag.change-list #content-main,
body.app-core.model-qu.change-list #content-main,
body.app-core.model-tag.change-list #content-main {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Ensure QU and Tag admin content has proper top margin to account for fixed header */
.admin-core-qu #content,
.admin-core-tag #content {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* ===== FIXED HEADER COMPENSATION FOR IMPORT-EXPORT-TOOLS AND MAIN ADMIN INDEX ===== */
/* Ensure import-export-tools page has proper top margin to account for fixed header */
html body[class*="import-export-tools"] #content-start,
html body[class*="import-export-tools"] .content-start,
body[class*="import-export-tools"] #content-start,
body[class*="import-export-tools"] .content-start {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

html body[class*="import-export-tools"] #content-main,
body[class*="import-export-tools"] #content-main {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

html body[class*="import-export-tools"] #content,
body[class*="import-export-tools"] #content {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Ensure main admin index page has proper top margin to account for fixed header */
html body[class*="admin-index"] #content-start,
html body[class*="admin-index"] .content-start,
body[class*="admin-index"] #content-start,
body[class*="admin-index"] .content-start {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

html body[class*="admin-index"] #content-main,
body[class*="admin-index"] #content-main {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

html body[class*="admin-index"] #content,
body[class*="admin-index"] #content {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Alternative selectors for admin index page */
html body .admin-index-panel,
body .admin-index-panel {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Tools container specific spacing */
html body .tools-container,
body .tools-container {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Ensure object-tools in QU and Tag admin are visible and properly positioned */
.admin-core-qu .object-tools,
.admin-core-tag .object-tools {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure object-tools list in QU and Tag admin is properly styled and visible */
.admin-core-qu .object-tools ul,
.admin-core-tag .object-tools ul {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure object-tools links in QU and Tag admin are visible */
.admin-core-qu .object-tools a,
.admin-core-tag .object-tools a {
    display: inline-block !important;
    padding: 8px 16px !important;
    background: #007cba !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background-color 0.3s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.admin-core-qu .object-tools a:hover,
.admin-core-tag .object-tools a:hover {
    background: #005a8b !important;
    color: white !important;
}

/* Ensure changelist in QU and Tag admin has proper spacing */
.admin-core-qu #changelist,
.admin-core-tag #changelist {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure changelist-form-container in QU and Tag admin has proper spacing */
.admin-core-qu .changelist-form-container,
.admin-core-tag .changelist-form-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hide "Select QU to change" and "Select Tag to change" headings */
.admin-core-qu h1,
.admin-core-tag h1,
.admin-core-qu .content h1,
.admin-core-tag .content h1,
.admin-core-qu #content h1,
.admin-core-tag #content h1,
.admin-core-qu .main h1,
.admin-core-tag .main h1 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    transform: scale(0) !important;
    filter: blur(10px) !important;
}

/* Fixed column widths for Tags view - Aggressive override */
.admin-core-tag #result_list th:nth-child(2),
.admin-core-tag #result_list td:nth-child(2),
.admin-core-tag .results th:nth-child(2),
.admin-core-tag .results td:nth-child(2),
.admin-core-tag .changelist th:nth-child(2),
.admin-core-tag .changelist td:nth-child(2),
.admin-core-tag table th:nth-child(2),
.admin-core-tag table td:nth-child(2),
.admin-core-tag #changelist-form #result_list th:nth-child(2),
.admin-core-tag #changelist-form #result_list td:nth-child(2),
.admin-core-tag #changelist #result_list th:nth-child(2),
.admin-core-tag #changelist #result_list td:nth-child(2),
.admin-core-tag body #changelist #result_list th:nth-child(2),
.admin-core-tag body #changelist #result_list td:nth-child(2),
.admin-core-tag .admin #changelist #result_list th:nth-child(2),
.admin-core-tag .admin #changelist #result_list td:nth-child(2),
/* Additional selectors to catch all possible variations */
.admin-core-tag #changelist-form table th:nth-child(2),
.admin-core-tag #changelist-form table td:nth-child(2),
.admin-core-tag #changelist table th:nth-child(2),
.admin-core-tag #changelist table td:nth-child(2),
.admin-core-tag .changelist-form-container table th:nth-child(2),
.admin-core-tag .changelist-form-container table td:nth-child(2),
.admin-core-tag .results table th:nth-child(2),
.admin-core-tag .results table td:nth-child(2),
/* Even more specific selectors */
.admin-core-tag #changelist-form .results th:nth-child(2),
.admin-core-tag #changelist-form .results td:nth-child(2),
.admin-core-tag #changelist .results th:nth-child(2),
.admin-core-tag #changelist .results td:nth-child(2),
.admin-core-tag .changelist-form-container .results th:nth-child(2),
.admin-core-tag .changelist-form-container .results td:nth-child(2) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

.admin-core-tag #result_list th:nth-child(3),
.admin-core-tag #result_list td:nth-child(3),
.admin-core-tag .results th:nth-child(3),
.admin-core-tag .results td:nth-child(3),
.admin-core-tag .changelist th:nth-child(3),
.admin-core-tag .changelist td:nth-child(3),
.admin-core-tag table th:nth-child(3),
.admin-core-tag table td:nth-child(3) {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

.admin-core-tag #result_list th:nth-child(4),
.admin-core-tag #result_list td:nth-child(4),
.admin-core-tag .results th:nth-child(4),
.admin-core-tag .results td:nth-child(4),
.admin-core-tag .changelist th:nth-child(4),
.admin-core-tag .changelist td:nth-child(4),
.admin-core-tag table th:nth-child(4),
.admin-core-tag table td:nth-child(4) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

/* Fixed column widths for QU view - Aggressive override */
.admin-core-qu #result_list th:nth-child(2),
.admin-core-qu #result_list td:nth-child(2),
.admin-core-qu .results th:nth-child(2),
.admin-core-qu .results td:nth-child(2),
.admin-core-qu .changelist th:nth-child(2),
.admin-core-qu .changelist td:nth-child(2),
.admin-core-qu table th:nth-child(2),
.admin-core-qu table td:nth-child(2) {
    width: 600px !important;
    min-width: 600px !important;
    max-width: 600px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

/* Fixed column widths for Tag view - 950px total */
.admin-core-tag #result_list th:nth-child(2),
.admin-core-tag #result_list td:nth-child(2),
.admin-core-tag .results th:nth-child(2),
.admin-core-tag .results td:nth-child(2),
.admin-core-tag .changelist th:nth-child(2),
.admin-core-tag .changelist td:nth-child(2),
.admin-core-tag table th:nth-child(2),
.admin-core-tag table td:nth-child(2) {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

.admin-core-tag #result_list th:nth-child(3),
.admin-core-tag #result_list td:nth-child(3),
.admin-core-tag .results th:nth-child(3),
.admin-core-tag .results td:nth-child(3),
.admin-core-tag .changelist th:nth-child(3),
.admin-core-tag .changelist td:nth-child(3),
.admin-core-tag table th:nth-child(3),
.admin-core-tag table td:nth-child(3) {
    width: 450px !important;
    min-width: 450px !important;
    max-width: 450px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

.admin-core-tag #result_list th:nth-child(4),
.admin-core-tag #result_list td:nth-child(4),
.admin-core-tag .results th:nth-child(4),
.admin-core-tag .results td:nth-child(4),
.admin-core-tag .changelist th:nth-child(4),
.admin-core-tag .changelist td:nth-child(4),
.admin-core-tag table th:nth-child(4),
.admin-core-tag table td:nth-child(4) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

.admin-core-tag #result_list th:nth-child(5),
.admin-core-tag #result_list td:nth-child(5),
.admin-core-tag .results th:nth-child(5),
.admin-core-tag .results td:nth-child(5),
.admin-core-tag .changelist th:nth-child(5),
.admin-core-tag .changelist td:nth-child(5),
.admin-core-tag table th:nth-child(5),
.admin-core-tag table td:nth-child(5) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

.admin-core-qu #result_list th:nth-child(3),
.admin-core-qu #result_list td:nth-child(3),
.admin-core-qu .results th:nth-child(3),
.admin-core-qu .results td:nth-child(3),
.admin-core-qu .changelist th:nth-child(3),
.admin-core-qu .changelist td:nth-child(3),
.admin-core-qu table th:nth-child(3),
.admin-core-qu table td:nth-child(3) {
    width: 600px !important;
    min-width: 600px !important;
    max-width: 600px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: table-cell !important;
}

/* Fix hover preview spacing - remove empty spaces */
.ps-toggle-preview {
    padding: 8px !important;
    margin: 0 !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    max-width: 300px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    font-size: 12px !important;
}

.ps-toggle-preview * {
    margin: 0 !important;
    padding: 0 !important;
}

.ps-toggle-preview p {
    margin-bottom: 4px !important;
}

.ps-toggle-preview p:last-child {
    margin-bottom: 0 !important;
}

/* Double the size of hover preview box */
.ps-toggle-preview {
    max-width: 600px !important;
    min-width: 400px !important;
    padding: 16px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Hide checkbox columns only on specific pages */
body.hxfilter-with-tags .action-checkbox-column,
body.hxfilter-with-tags .action-checkbox,
body.app-core.model-tag .action-checkbox-column,
body.app-core.model-tag .action-checkbox,
body.app-core.model-qu .action-checkbox-column,
body.app-core.model-qu .action-checkbox {
    display: none !important;
}

/* Hide first children only on specific pages */
body.hxfilter-with-tags table th:first-child,
body.hxfilter-with-tags table td:first-child,
body.app-core.model-tag table th:first-child,
body.app-core.model-tag table td:first-child,
body.app-core.model-qu table th:first-child,
body.app-core.model-qu table td:first-child {
    display: none !important;
}

/* ULTIMATE OVERRIDE for search results - Force show Name columns */
.search-results-container table th:first-child,
.search-results-container table td:first-child,
.search-results-container #content table th:first-child,
.search-results-container #content table td:first-child,
.search-results-container #content-main table th:first-child,
.search-results-container #content-main table td:first-child,
.search-results-container .main table th:first-child,
.search-results-container .main table td:first-child {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    border: inherit !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    z-index: auto !important;
}

/* EXTREME OVERRIDE for search results - Target all possible selectors */
html body .search-results-container table th:first-child,
html body .search-results-container table td:first-child,
html body .search-results-container #content table th:first-child,
html body .search-results-container #content table td:first-child,
html body .search-results-container #content-main table th:first-child,
html body .search-results-container #content-main table td:first-child,
html body .search-results-container .main table th:first-child,
html body .search-results-container .main table td:first-child,
html body .search-results-container table thead th:first-child,
html body .search-results-container table tbody td:first-child,
html body .search-results-container tr th:first-child,
html body .search-results-container tr td:first-child {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    border: inherit !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    z-index: auto !important;
}

/* Force show User column in BatchTagLog admin */
body.app-core.model-batchtaglog .column-user,
body.app-core.model-batchtaglog table th.column-user,
body.app-core.model-batchtaglog table td.column-user,
body.changelist.app-core.model-batchtaglog .column-user,
body.changelist.app-core.model-batchtaglog table th.column-user,
body.changelist.app-core.model-batchtaglog table td.column-user {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    border: inherit !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    z-index: auto !important;
}

/* ULTIMATE OVERRIDE for name-column class - This should override everything */
html body .search-results-container .name-column,
html body .search-results-container table .name-column,
html body .search-results-container #content .name-column,
html body .search-results-container #content-main .name-column,
html body .search-results-container .main .name-column,
html body .search-results-container table thead .name-column,
html body .search-results-container table tbody .name-column,
html body .search-results-container tr .name-column,
html body .search-results-container th.name-column,
html body .search-results-container td.name-column {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    padding: 8px !important;
    margin: 0 !important;
    border: 1px solid #ddd !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    z-index: auto !important;
}

/* Override tag_columns.css table layout for Tags view */
.admin-core-tag #changelist-form #result_list,
.admin-core-tag #changelist #result_list,
.admin-core-tag .admin #changelist #result_list,
.admin-core-tag body #changelist #result_list {
    table-layout: fixed !important;
    width: 950px !important;
    min-width: 950px !important;
    max-width: 950px !important;
    border-collapse: collapse !important;
}

/* ULTIMATE OVERRIDE for Tags view - Force fixed widths */
.admin-core-tag #result_list th:nth-child(2),
.admin-core-tag #result_list td:nth-child(2) {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.admin-core-tag #result_list th:nth-child(3),
.admin-core-tag #result_list td:nth-child(3) {
    width: 450px !important;
    min-width: 450px !important;
    max-width: 450px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.admin-core-tag #result_list th:nth-child(4),
.admin-core-tag #result_list td:nth-child(4) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* ULTIMATE OVERRIDE for PS change form - Fix squeezed fields */
html body.app-core.model-ps.change-form .aligned,
html body.app-core.model-ps.change-form .form-row,
html body.app-core.model-ps.change-form .field-box,
html body.app-core.model-ps.change-form form#ps_form,
html body.app-core.model-ps.change-form form#ps_form div {
    width: 100% !important;
    max-width: none !important;
}

/* Target all form fields in PS change form */
html body.app-core.model-ps.change-form textarea,
html body.app-core.model-ps.change-form input[type="text"],
html body.app-core.model-ps.change-form input[type="number"],
html body.app-core.model-ps.change-form input[type="url"],
html body.app-core.model-ps.change-form .vLargeTextField,
html body.app-core.model-ps.change-form .vTextField {
    width: 100% !important;
    min-width: 600px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Override Django admin's default form constraints */
html body.app-core.model-ps.change-form .aligned .form-row {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 15px !important;
}

/* Ensure the main content area is wide enough */
html body.app-core.model-ps.change-form #content-main {
    width: 100% !important;
    max-width: none !important;
}

html body.app-core.model-ps.change-form #content {
    width: 100% !important;
    max-width: none !important;
}

/* Add spacing for Tags and QU change forms */
html body.app-core.model-tag.change-form textarea,
html body.app-core.model-tag.change-form input[type="text"],
html body.app-core.model-tag.change-form input[type="number"],
html body.app-core.model-tag.change-form input[type="url"],
html body.app-core.model-tag.change-form .vLargeTextField,
html body.app-core.model-tag.change-form .vTextField,
html body.app-core.model-qu.change-form textarea,
html body.app-core.model-qu.change-form input[type="text"],
html body.app-core.model-qu.change-form input[type="number"],
html body.app-core.model-qu.change-form input[type="url"],
html body.app-core.model-qu.change-form .vLargeTextField,
html body.app-core.model-qu.change-form .vTextField {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure form containers have proper spacing */
html body.app-core.model-tag.change-form .aligned,
html body.app-core.model-tag.change-form .form-row,
html body.app-core.model-tag.change-form .field-box,
html body.app-core.model-qu.change-form .aligned,
html body.app-core.model-qu.change-form .form-row,
html body.app-core.model-qu.change-form .field-box {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 15px !important;
}

/* Override any inline styles with !important */
html body.app-core.model-ps.change-form textarea[style*="width"],
html body.app-core.model-ps.change-form input[style*="width"],
html body.app-core.model-tag.change-form textarea[style*="width"],
html body.app-core.model-tag.change-form input[style*="width"],
html body.app-core.model-qu.change-form textarea[style*="width"],
html body.app-core.model-qu.change-form input[style*="width"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Target specific form containers by ID with maximum specificity */
html body #tag_form,
html body #ps_form,
html body #qu_form,
body #tag_form,
body #ps_form,
body #qu_form {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Target form containers in change forms */
html body .change-form #tag_form,
html body .change-form #ps_form,
html body .change-form #qu_form,
body .change-form #tag_form,
body .change-form #ps_form,
body .change-form #qu_form {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Target any form element with these IDs */
html body form#tag_form,
html body form#ps_form,
html body form#qu_form,
body form#tag_form,
body form#ps_form,
body form#qu_form {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Target the main content area and ensure it has proper spacing */
html body .main > .content,
body .main > .content {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Target the content-main container */
html body #content-main,
body #content-main {
    padding-right: 20px !important;
    padding-left: 0px !important;
    box-sizing: border-box !important;
}

/* Target the content container */
html body #content,
body #content {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Target fieldset containers */
html body .change-form fieldset.module.aligned,
body .change-form fieldset.module.aligned {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Target the form div container */
html body .change-form form > div,
body .change-form form > div {
    padding-right: 20px !important;
    padding-left: 50px !important;
    box-sizing: border-box !important;
}

/* Nuclear option - target everything in change forms */
html body .change-form *,
body .change-form * {
    box-sizing: border-box !important;
}

/* Ensure the main container has proper spacing */
html body .main,
body .main {
    padding-right: 20px !important;
    padding-left: 0px !important;
    box-sizing: border-box !important;
}

/* ===== COMPREHENSIVE FIXED HEADER COMPENSATION FOR QU AND TAG ADMIN ===== */
/* Target all possible elements that might appear at the top of QU and Tag admin pages */

/* Body padding for QU and Tag admin */
html body.app-core.model-qu.changelist,
html body.app-core.model-tag.changelist,
body.app-core.model-qu.changelist,
body.app-core.model-tag.changelist {
    padding-top: 60px !important; /* Account for fixed header height */
}

/* Content start area */
html body.app-core.model-qu.changelist #content-start,
html body.app-core.model-tag.changelist #content-start,
body.app-core.model-qu.changelist #content-start,
body.app-core.model-tag.changelist #content-start,
html body.app-core.model-qu.changelist .content-start,
html body.app-core.model-tag.changelist .content-start,
body.app-core.model-qu.changelist .content-start,
body.app-core.model-tag.changelist .content-start {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Main content area */
html body.app-core.model-qu.change-list #content-main,
html body.app-core.model-tag.change-list #content-main,
body.app-core.model-qu.change-list #content-main,
body.app-core.model-tag.change-list #content-main {
    margin-top: 40px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Content area */
html body.app-core.model-qu.changelist #content,
html body.app-core.model-tag.changelist #content,
body.app-core.model-qu.changelist #content,
body.app-core.model-tag.changelist #content {
    margin-top: 80px !important; /* Account for fixed header height */
    padding-top: 0 !important;
}

/* Object tools container */
html body.app-core.model-qu.changelist .object-tools,
html body.app-core.model-tag.changelist .object-tools,
body.app-core.model-qu.changelist .object-tools,
body.app-core.model-tag.changelist .object-tools {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Error notes */
html body.app-core.model-qu.changelist .errornote,
html body.app-core.model-tag.changelist .errornote,
body.app-core.model-qu.changelist .errornote,
body.app-core.model-tag.changelist .errornote {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Changelist module */
html body.app-core.model-qu.changelist #changelist,
html body.app-core.model-tag.changelist #changelist,
body.app-core.model-qu.changelist #changelist,
body.app-core.model-tag.changelist #changelist {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Changelist form container */
html body.app-core.model-qu.changelist .changelist-form-container,
html body.app-core.model-tag.changelist .changelist-form-container,
body.app-core.model-qu.changelist .changelist-form-container,
body.app-core.model-tag.changelist .changelist-form-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Search forms */
html body.app-core.model-qu.changelist .search-form,
html body.app-core.model-tag.changelist .search-form,
body.app-core.model-qu.changelist .search-form,
body.app-core.model-tag.changelist .search-form {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Date hierarchy */
html body.app-core.model-qu.changelist .date-hierarchy,
html body.app-core.model-tag.changelist .date-hierarchy,
body.app-core.model-qu.changelist .date-hierarchy,
body.app-core.model-tag.changelist .date-hierarchy {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Changelist form */
html body.app-core.model-qu.changelist #changelist-form,
html body.app-core.model-tag.changelist #changelist-form,
body.app-core.model-qu.changelist #changelist-form,
body.app-core.model-tag.changelist #changelist-form {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Admin actions */
html body.app-core.model-qu.changelist .actions,
html body.app-core.model-tag.changelist .actions,
body.app-core.model-qu.changelist .actions,
body.app-core.model-tag.changelist .actions {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Pagination */
html body.app-core.model-qu.changelist .paginator,
html body.app-core.model-tag.changelist .paginator,
body.app-core.model-qu.changelist .paginator,
body.app-core.model-tag.changelist .paginator {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Results list */
html body.app-core.model-qu.changelist .results,
html body.app-core.model-tag.changelist .results,
body.app-core.model-qu.changelist .results,
body.app-core.model-tag.changelist .results {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Changelist filter */
html body.app-core.model-qu.changelist #changelist-filter,
html body.app-core.model-tag.changelist #changelist-filter,
body.app-core.model-qu.changelist #changelist-filter,
body.app-core.model-tag.changelist #changelist-filter {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Module containers */
html body.app-core.model-qu.changelist .module,
html body.app-core.model-tag.changelist .module,
body.app-core.model-qu.changelist .module,
body.app-core.model-tag.changelist .module {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Formset management forms */
html body.app-core.model-qu.changelist .formset-management-form,
html body.app-core.model-tag.changelist .formset-management-form,
body.app-core.model-qu.changelist .formset-management-form,
body.app-core.model-tag.changelist .formset-management-form {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Any direct children of content-main */
html body.app-core.model-qu.changelist #content-main > *,
html body.app-core.model-tag.changelist #content-main > *,
body.app-core.model-qu.changelist #content-main > *,
body.app-core.model-tag.changelist #content-main > * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure the first element after object-tools has no top margin */
html body.app-core.model-qu.changelist .object-tools + *,
html body.app-core.model-tag.changelist .object-tools + *,
body.app-core.model-qu.changelist .object-tools + *,
body.app-core.model-tag.changelist .object-tools + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Left-align table cell contents */
#result_list th,
#result_list td,
table th,
table td {
    padding-left: 0px !important;
    text-align: left !important;
}

/* Specific targeting for field elements */
.field-name_display,
.field-content_text_preview {
    padding-left: 0px !important;
    margin-left: 0px !important;
    text-align: left !important;
}

/* Target all child elements within these fields */
.field-name_display *,
.field-content_text_preview * {
    padding-left: 0px !important;
    margin-left: 0px !important;
}

/* Specific targeting for name cell controls */
.field-name_display .name-cell-with-controls,
.field-name_display .linked-names-below {
    padding-left: 2px !important;
    margin-left: 0px !important;
}

/* Ultra-specific targeting to override any remaining padding */
th.field-name_display,
td.field-content_text_preview {
    padding-left: 0px !important;
    margin-left: 0px !important;
}

/* Target the specific table cells in result list */
#result_list th.field-name_display,
#result_list td.field-content_text_preview {
    padding-left: 0px !important;
    margin-left: 0px !important;
}

/* Override ps_admin.css padding for name column (2nd child) with higher specificity */
body #result_list th:nth-child(2),
body #result_list td:nth-child(2) {
    padding: 0px 8px 8px 0px !important;
}

/* Override ps_admin.css padding for content column (3rd child) with higher specificity */
body #result_list th:nth-child(3),
body #result_list td:nth-child(3) {
    padding: 0px 8px 8px 0px !important;
}

/* Even more specific targeting to override ps_admin.css */
html body #result_list th:nth-child(2),
html body #result_list td:nth-child(2),
html body #result_list th:nth-child(3),
html body #result_list td:nth-child(3) {
    padding-left: 0px !important;
}

/* Restore proper alignment for annotation buttons */
.annotation-remove-btn,
.annotation-add-btn {
    float: right !important;
    margin-left: auto !important;
    margin-right: 0px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* Ensure button containers are properly aligned */
.field-annotation_controls,
.field-annotation_controls * {
    text-align: right !important;
    padding-left: 0px !important;
}

/* Target specific button containers */
.field-annotation_controls .annotation-remove-btn,
.field-annotation_controls .annotation-add-btn {
    display: inline-block !important;
    float: right !important;
    margin-left: 8px !important;
    margin-right: 0px !important;
}

/* Ensure hyperlink highlighting works properly */
.content-hyperlink.inline-hyperlink.highlighted {
    background-color: #ffeb3b !important;
    color: #000 !important;
    border-color: #ffc107 !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.annotation.highlighted {
    background-color: #ffeb3b !important;
    color: #000 !important;
    border-color: #ffc107 !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

/* Override inline styles for content positioning */
#content {
    padding-left: 0px !important;
    padding-right: 0px !important;
}

#content-main {
    padding-left: 0px !important;
    padding-right: 0px !important;
    margin-left: 0px !important;
}

/* Refined SVG wheel styling for sharpness, darker wood, and exact gradient match */
.teker-logo-wrapper {
    display: inline-block !important;
    position: relative !important;
    height: 64px !important;
    width: auto !important;
    min-width: 64px !important; /* Ensure minimum width for gradient */
    border-radius: 4px !important;
    overflow: hidden !important;
    /* Inherit background from header to ensure exact match */
    background: inherit !important;
}

#site-name img[src*="teker.svg"] {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    image-rendering: auto !important; /* Let browser optimize rendering */
    filter: none !important; /* Remove filter that might affect background appearance */
    position: relative !important;
    z-index: 1 !important;
    width: auto !important; /* Don't force square dimensions */
    height: 64px !important;
}