/* LiveGemini Admin Theme (global) */

:root {
  --lg-admin-bg-1: #120a25;
  --lg-admin-bg-2: #1a0f34;
  --lg-admin-surface: linear-gradient(135deg, rgba(33, 18, 61, 0.9), rgba(25, 13, 50, 0.86));
  --lg-admin-border: rgba(139, 69, 255, 0.2);
  --lg-admin-border-strong: rgba(175, 110, 255, 0.45);
  --lg-admin-text: rgba(245, 238, 255, 0.96);
  --lg-admin-muted: #ffffff;
  --lg-admin-accent: #b47bff;
  --lg-admin-accent-2: #8b45ff;
  --lg-admin-success: #52c41a;
  --lg-admin-warn: #faad14;
  --lg-admin-danger: #ff4d4f;
  --lg-admin-focus: #f8e9ff;
  --lg-admin-shadow: 0 14px 34px rgba(8, 4, 18, 0.45);
  --lg-space-1: 8px;
  --lg-space-2: 12px;
  --lg-space-3: 16px;
  --lg-space-4: 20px;
}

html, body {
  background: linear-gradient(180deg, var(--lg-admin-bg-1) 0%, var(--lg-admin-bg-2) 100%) !important;
  color: var(--lg-admin-text);
}

#container {
  background: transparent !important;
}

#header {
  background: linear-gradient(135deg, #1a0f34 0%, #2c1950 45%, #431f66 100%) !important;
  color: var(--lg-admin-text) !important;
  border-bottom: 1px solid var(--lg-admin-border);
  box-shadow: 0 10px 24px rgba(8, 4, 18, 0.35);
  min-height: 60px;
  display: flex;
  align-items: center;
}

#grp-header {
  background-color: #1a0f34 !important;
  background-image: linear-gradient(135deg, #1a0f34 0%, #2c1950 45%, #431f66 100%) !important;
  color: var(--lg-admin-text) !important;
  border-bottom: 1px solid var(--lg-admin-border) !important;
  box-shadow: 0 10px 24px rgba(8, 4, 18, 0.35) !important;
  position: relative !important;
  top: auto !important;
  z-index: 40 !important;
}

#header,
#header * ,
#grp-header,
#grp-header * {
  background-color: transparent;
}

#grp-header,
#header {
  background-color: #1a0f34 !important;
  background-image: linear-gradient(135deg, #1a0f34 0%, #2c1950 45%, #431f66 100%) !important;
}

#grp-navigation {
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 6px 12px !important;
  background: transparent !important;
}

#grp-branding {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  background: transparent !important;
}

#site-name,
#grp-branding h1,
h1#site-name {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

#branding h1,
#branding h1 a:link,
#branding h1 a:visited,
#site-name a {
  color: #fff !important;
  letter-spacing: 0.2px;
}

#branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lg-admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.lg-admin-brand img {
  width: 42px;
  height: 42px;
  max-width: none !important;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(139, 69, 255, 0.35);
}

.lg-admin-brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.lg-admin-brand-main {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.lg-admin-brand-sub {
  font-weight: 600;
  font-size: 11px;
  color: var(--lg-admin-muted);
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

/* Hide duplicate title next to branding */
#grp-admin-title {
  display: none !important;
}

#user-tools, #user-tools a {
  color: var(--lg-admin-muted) !important;
}

#user-tools a:hover {
  color: #fff !important;
}

#nav-sidebar,
#content,
#content-main,
.module,
.inline-group,
.grp-module,
.grp-group,
.grp-row,
.dashboard .module {
  background: var(--lg-admin-surface) !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 22px rgba(6, 3, 13, 0.28);
  color: var(--lg-admin-text) !important;
}

#content {
  padding: var(--lg-space-3) !important;
}

#content-main,
#grp-content {
  display: block;
}

#content-main > *,
#grp-content > * {
  margin-bottom: var(--lg-space-3) !important;
}

#content-main > *:last-child,
#grp-content > *:last-child {
  margin-bottom: 0 !important;
}

/* Grappelli content spacing cleanup */
#grp-content-container,
#grp-content {
  padding-top: 12px !important;
  padding-right: 14px !important;
  padding-left: 14px !important;
  padding-bottom: 8px !important;
  margin-bottom: 0 !important;
}

#grp-content {
  min-height: auto !important;
  padding-top: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  padding-bottom: 70px !important;
}

/* Stronger fallback for Grappelli layout wrappers */
body.grp-app #grp-content-container,
body.grp-app #grp-content,
body.grp-change-list #grp-content-container,
body.grp-change-list #grp-content,
body.dashboard #grp-content-container,
body.dashboard #grp-content {
  padding-bottom: 8px !important;
  margin-bottom: 0 !important;
}

#grp-content .grp-module,
#grp-content .module {
  margin-bottom: var(--lg-space-3) !important;
}

#grp-content > .grp-module,
#grp-content > .module {
  margin-bottom: var(--lg-space-3) !important;
}

.module,
.grp-module,
.inline-group,
.grp-group,
.grp-row,
.dashboard .module {
  margin-bottom: var(--lg-space-3) !important;
}

.module:last-child,
.grp-module:last-child,
.inline-group:last-child,
.grp-group:last-child,
.grp-row:last-child,
.dashboard .module:last-child {
  margin-bottom: 0 !important;
}

/* Remove duplicate Grappelli in-content header and keep compact top spacing */
#grp-content-title {
  display: none !important;
}

#grp-content {
  padding-top: 16px !important;
}

.breadcrumbs {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--lg-admin-muted) !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 10px;
}

.breadcrumbs a {
  color: #e9d6ff !important;
}

h1, h2, h3, h4, h5, h6,
.module h2,
.module caption,
#content-related h2,
fieldset .description {
  color: #fff !important;
}

a {
  color: #dcb6ff;
}

a:hover {
  color: #fff;
}

table {
  border-collapse: collapse !important;
  margin-bottom: var(--lg-space-3) !important;
}

thead th,
th {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--lg-admin-muted) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

tbody td,
tbody th,
td {
  color: var(--lg-admin-text) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

tr:hover td,
tr:hover th {
  background: rgba(255, 255, 255, 0.04) !important;
}

.module h2 + table,
.module h3 + table,
.grp-module h2 + table,
.grp-module h3 + table,
.analytics-card h3 + table {
  margin-top: var(--lg-space-1);
}

.module table + table,
.grp-module table + table,
.analytics-card table + table {
  margin-top: var(--lg-space-2);
}

.grp-module h2,
.grp-module h3,
.module h2,
.module h3,
.analytics-card h3 {
  margin-bottom: var(--lg-space-2) !important;
}

fieldset,
.aligned .form-row,
.grp-row {
  margin-bottom: var(--lg-space-2) !important;
}

.aligned .form-row:last-child {
  margin-bottom: 0 !important;
}

.change-form .submit-row,
.grp-submit-row,
.submit-row {
  margin-top: var(--lg-space-3) !important;
  margin-bottom: 0 !important;
}

#changelist-filter h2,
#changelist-filter h3 {
  margin-top: 0 !important;
  margin-bottom: var(--lg-space-2) !important;
}

#changelist-filter ul,
#changelist-filter li {
  margin-bottom: var(--lg-space-1) !important;
}

.paginator,
.pagination {
  color: var(--lg-admin-muted) !important;
}

.paginator a,
.pagination a {
  color: #f0ddff !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.06);
}

.paginator a:hover,
.pagination a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--lg-admin-border-strong) !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select,
.vTextField,
.vLargeTextField {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px !important;
}

/* Global dropdown clarity (all admin views) */
select:not([multiple]):not([size]) {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 34px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #ffffff 50%),
    linear-gradient(135deg, #ffffff 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px) !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
}

select:not([multiple]):not([size])::-ms-expand {
  display: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(211, 189, 243, 0.65) !important;
}

/* Keep CKEditor content readable inside the dark admin theme. */
.ck.ck-editor,
.django_ckeditor_5,
.django-ckeditor-widget {
  color: #111827 !important;
}

.ck.ck-editor__main > .ck-editor__editable,
.ck.ck-content,
.django_ckeditor_5 .ck-editor__editable,
.django-ckeditor-widget .ck-editor__editable {
  min-height: 260px;
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(17, 24, 39, 0.14) !important;
}

.ck.ck-editor__main > .ck-editor__editable *,
.ck.ck-content *,
.django_ckeditor_5 .ck-editor__editable *,
.django-ckeditor-widget .ck-editor__editable * {
  color: inherit !important;
}

.ck.ck-toolbar,
.ck.ck-toolbar *,
.ck.ck-reset_all,
.ck.ck-reset_all * {
  color: #111827 !important;
}

.ck.ck-toolbar,
.ck.ck-dropdown__panel,
.ck.ck-balloon-panel {
  background: #f8fafc !important;
  border-color: rgba(17, 24, 39, 0.12) !important;
}

.ck.ck-button:not(.ck-disabled):hover,
.ck.ck-button.ck-on {
  background: rgba(17, 24, 39, 0.08) !important;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lg-admin-focus) !important;
  outline-offset: 2px !important;
  border-color: var(--lg-admin-border-strong) !important;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
.object-tools a,
.addlink,
.changelink,
.deletelink {
  background: linear-gradient(135deg, var(--lg-admin-accent) 0%, var(--lg-admin-accent-2) 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  min-height: 38px;
  line-height: 1.2;
  padding: 8px 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px rgba(139, 69, 255, 0.35);
}

.object-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
}

#grp-user-tools li.grp-dashboard-link a {
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ff4f9f 0%, #b94dff 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 7px 12px !important;
  box-shadow: 0 8px 20px rgba(139, 69, 255, 0.35) !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  min-height: 36px !important;
  gap: 8px !important;
}

#grp-user-tools li.grp-dashboard-link a:hover {
  filter: brightness(1.05);
}

#grp-user-tools li.grp-dashboard-link a::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 14px;
  background-color: currentColor;
  opacity: 0.95;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M4 20V4'/%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M8 16v-5'/%3E%3Cpath d='M12 16V9'/%3E%3Cpath d='M16 16v-8'/%3E%3Cpath d='M20 16v-3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M4 20V4'/%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M8 16v-5'/%3E%3Cpath d='M12 16V9'/%3E%3Cpath d='M16 16v-8'/%3E%3Cpath d='M20 16v-3'/%3E%3C/svg%3E");
}

#grp-user-tools {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#grp-user-tools > li > a {
  border-radius: 10px !important;
  padding: 7px 11px !important;
  color: var(--lg-admin-text) !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  min-height: 36px !important;
}

#grp-user-tools > li,
#grp-user-tools .grp-user-options-container,
#grp-user-tools .grp-user-options,
#grp-user-tools ul {
  background: transparent !important;
}

/* Breadcrumbs readability (Grappelli + Django admin variants) */
.breadcrumbs,
#grp-context-navigation,
#grp-context-navigation .grp-horizontal-list,
#grp-context-navigation ul,
#grp-context-navigation li,
#grp-context-navigation li a {
  background: rgba(32, 18, 58, 0.82) !important;
  color: #ffffff !important;
  border-color: var(--lg-admin-border) !important;
  text-shadow: none !important;
}

#grp-context-navigation {
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
}

#grp-context-navigation li a,
.breadcrumbs a {
  color: #ffffff !important;
}

#grp-context-navigation li,
.breadcrumbs {
  font-weight: 600;
  color: #ffffff !important;
  text-shadow: none !important;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
.object-tools a:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.deletelink-box a.deletelink,
input[type="submit"].deletelink,
.submit-row .deletelink {
  background: linear-gradient(135deg, #ff5f62 0%, #d9363e 100%) !important;
}

.messagelist li,
ul.messagelist li {
  border-radius: 10px !important;
  border: 1px solid var(--lg-admin-border) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

.messagelist li.success {
  border-left: 4px solid var(--lg-admin-success) !important;
}

.messagelist li.warning {
  border-left: 4px solid var(--lg-admin-warn) !important;
}

.messagelist li.error {
  border-left: 4px solid var(--lg-admin-danger) !important;
}

#changelist-filter {
  background: var(--lg-admin-surface) !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 12px !important;
  padding: 10px !important;
}

#changelist-filter h2,
#changelist-filter h3 {
  color: #fff !important;
}

#changelist-filter a {
  color: #e9d6ff !important;
}

#changelist-filter li.selected a {
  color: #fff !important;
  font-weight: 700;
}

.selector-available h2,
.selector-chosen h2 {
  color: #fff !important;
}

.help, p.help, .helptext {
  color: var(--lg-admin-muted) !important;
}

/* Grappelli compatibility */
.grp-header,
.grp-headers,
.grp-module h2,
.grp-module h3,
.grp-collapse-handler,
.grp-collapse-handler-container {
  background: transparent !important;
  color: #fff !important;
}

.grp-results table tr:hover td {
  background: rgba(255,255,255,0.04) !important;
}

@media (max-width: 1024px) {
  #content {
    padding: 10px !important;
  }
  .module,
  .grp-module {
    border-radius: 12px !important;
  }
}

/* Admin changelist usability (Data & Models -> Manage) */
body.change-list #content-main,
body.grp-change-list #grp-content {
  width: 100% !important;
  max-width: 100% !important;
  padding-bottom: 50px !important;
}

#changelist {
  width: 100% !important;
  max-width: 100% !important;
}

#changelist .results,
#changelist-form .results {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 14px !important;
  background: rgba(23, 12, 43, 0.8) !important;
}

#changelist table,
#changelist table#result_list {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: auto !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#changelist thead th,
#changelist #result_list thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
  background: linear-gradient(180deg, rgba(44, 25, 80, 0.98), rgba(31, 17, 57, 0.98)) !important;
  color: #f4e7ff !important;
  text-transform: none !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  padding: 12px 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
}

#changelist tbody td,
#changelist tbody th {
  font-size: 13px !important;
  line-height: 1.45 !important;
  padding: 11px 10px !important;
  color: var(--lg-admin-text) !important;
  vertical-align: middle !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#changelist tbody tr:nth-child(even) td,
#changelist tbody tr:nth-child(even) th {
  background: rgba(255, 255, 255, 0.02) !important;
}

#changelist tbody tr:hover td,
#changelist tbody tr:hover th {
  background: rgba(180, 123, 255, 0.1) !important;
}

#changelist td a,
#changelist th a {
  color: #f0ddff !important;
  text-decoration: none !important;
}

#changelist td a:hover,
#changelist th a:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

#changelist .paginator,
#changelist .xfull {
  margin-top: 12px !important;
}

#changelist .actions,
#changelist .actions select,
#changelist .actions label {
  color: var(--lg-admin-text) !important;
}

#changelist-search,
#toolbar,
#changelist .actions {
  background: rgba(30, 17, 55, 0.72) !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 12px !important;
  padding: 10px !important;
}

#changelist-filter {
  width: 300px !important;
  max-width: 32vw !important;
}

#changelist-filter h2,
#changelist-filter h3,
#changelist-filter li,
#changelist-filter a {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

@media (max-width: 1200px) {
  #changelist-filter {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 12px !important;
  }
}

/* Strong Grappelli overrides for list pages */
#grp-content table.grp-table,
#grp-content .grp-results table.grp-table,
table.grp-table {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: rgba(23, 12, 43, 0.82) !important;
}

table.grp-table thead th,
table.grp-table thead th a {
  background: linear-gradient(180deg, rgba(44, 25, 80, 0.98), rgba(31, 17, 57, 0.98)) !important;
  color: #f4e7ff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  padding: 12px 10px !important;
}

table.grp-table thead th:first-child {
  border-left: none !important;
}

table.grp-table.grp-sortable thead th.sortable .grp-text a {
  border: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: transparent !important;
}

table.grp-table.grp-sortable thead th.sortable .grp-text a::after {
  content: "↕" !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: rgba(240, 221, 255, 0.86) !important;
  line-height: 1 !important;
}

table.grp-table.grp-sortable thead th.sortable.ascending .grp-text a::after,
table.grp-table.grp-sortable thead th.sortable.sorted.ascending .grp-text a::after,
table.grp-table.grp-sortable thead th.sortable.asc .grp-text a::after,
table.grp-table.grp-sortable thead th.sortable.sorted.asc .grp-text a::after {
  content: "↑" !important;
  color: #ffffff !important;
}

table.grp-table.grp-sortable thead th.sortable.descending .grp-text a::after,
table.grp-table.grp-sortable thead th.sortable.sorted.descending .grp-text a::after,
table.grp-table.grp-sortable thead th.sortable.desc .grp-text a::after,
table.grp-table.grp-sortable thead th.sortable.sorted.desc .grp-text a::after {
  content: "↓" !important;
  color: #ffffff !important;
}

table.grp-table tbody tr.grp-row-even td,
table.grp-table tbody tr.grp-row-even th,
table.grp-table tbody tr.grp-alt td,
table.grp-table tbody tr.grp-alt th,
table.grp-table tbody tr.grp-row-odd td,
table.grp-table tbody tr.grp-row-odd th {
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--lg-admin-text) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  padding: 11px 10px !important;
}

table.grp-table tbody tr.grp-row-even:hover td,
table.grp-table tbody tr.grp-row-even:hover th,
table.grp-table tbody tr.grp-alt:hover td,
table.grp-table tbody tr.grp-alt:hover th,
table.grp-table tbody tr.grp-row-odd:hover td,
table.grp-table tbody tr.grp-row-odd:hover th {
  background: rgba(180, 123, 255, 0.1) !important;
}

table.grp-table td a,
table.grp-table th a {
  color: #f0ddff !important;
}

table.grp-table td a:hover,
table.grp-table th a:hover {
  color: #ffffff !important;
}

/* Grappelli top search/filter/action blocks */
#grp-changelist-search,
#grp-content .grp-changelist-search,
#grp-content .grp-tools,
#grp-content .grp-changelist-actions,
#grp-content .grp-actions,
#grp-content .actions {
  background: rgba(30, 17, 55, 0.76) !important;
  border: 1px solid var(--lg-admin-border) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  color: var(--lg-admin-text) !important;
}

#grp-changelist-search input,
#grp-changelist-search select,
#grp-content .grp-tools input,
#grp-content .grp-tools select,
#grp-content .grp-changelist-actions input,
#grp-content .grp-changelist-actions select {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
}

#grp-content .grp-tools label,
#grp-content .grp-changelist-actions label,
#grp-content .grp-actions label,
#grp-content .actions label {
  color: var(--lg-admin-text) !important;
  font-weight: 600 !important;
}

/* Changelist modern polish */
#changelist-form .results,
#changelist-form .grp-results,
#grp-content .grp-results {
  border: 1px solid rgba(180, 123, 255, 0.22) !important;
  box-shadow: 0 12px 28px rgba(8, 4, 18, 0.35) !important;
}

#changelist-form table thead th,
#changelist-form table.grp-table thead th {
  letter-spacing: 0.01em !important;
}

#changelist-form table tbody td,
#changelist-form table tbody th,
#grp-content table.grp-table tbody td,
#grp-content table.grp-table tbody th {
  border: none !important;
}

#changelist-form table tbody td:last-child,
#changelist-form table tbody th:last-child,
#grp-content table.grp-table tbody td:last-child,
#grp-content table.grp-table tbody th:last-child {
  border-right: none !important;
}

#changelist-form #toolbar,
#changelist-form #changelist-search,
#changelist-form #grp-changelist-search,
#changelist-form form#grp-changelist-search-form,
#grp-content form#grp-changelist-search-form,
#grp-content #grp-changelist-search {
  background: rgba(29, 16, 53, 0.84) !important;
  border: 1px solid rgba(180, 123, 255, 0.24) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

#changelist-form #toolbar input,
#changelist-form #toolbar select,
#changelist-form #changelist-search input,
#changelist-form #changelist-search select,
#changelist-form #grp-changelist-search input,
#changelist-form #grp-changelist-search select,
#changelist-filter select,
#changelist-filter input,
#grp-content #changelist-filter select,
#grp-content #changelist-filter input {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #fff !important;
  border: 1px solid rgba(200, 162, 255, 0.34) !important;
  border-radius: 10px !important;
  min-height: 36px !important;
  box-shadow: none !important;
}

.grp-messagelist>li.grp-success {
  border: 1px solid #b7e28c;
  background: #d1ecb5;
  color: #000000;
}

#grp-content #grp-changelist-search {
  min-height: 0px !important;
  padding: 4px 10px !important;
}

#changelist-filter {
  background: rgba(27, 15, 50, 0.92) !important;
  border: 1px solid rgba(180, 123, 255, 0.24) !important;
  box-shadow: 0 10px 24px rgba(8, 4, 18, 0.3) !important;
}

#changelist-filter a {
  display: inline-block;
  padding: 2px 0;
}

#changelist .actions,
#changelist-form .actions,
#grp-content .grp-actions,
#grp-content .grp-changelist-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(30, 17, 55, 0.8) !important;
  border: 1px solid rgba(180, 123, 255, 0.24) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  margin-top: 12px !important;
}

.grp-float-left.grp-changelist-actions,
.grp-changelist-actions {
  margin: 0 !important;
}

#changelist .actions label,
#changelist-form .actions label,
#grp-content .grp-actions label,
#grp-content .grp-changelist-actions label {
  margin: 0 !important;
  line-height: 1.2 !important;
}

#changelist .actions select,
#changelist-form .actions select,
#grp-content .grp-actions select,
#grp-content .grp-changelist-actions select {
  min-width: 180px !important;
}

#changelist .actions button,
#changelist .actions input[type="submit"],
#changelist .actions input[type="button"],
#changelist-form .actions button,
#changelist-form .actions input[type="submit"],
#changelist-form .actions input[type="button"],
#grp-content .grp-actions button,
#grp-content .grp-actions input[type="submit"],
#grp-content .grp-changelist-actions button,
#grp-content .grp-changelist-actions input[type="submit"],
#grp-content .grp-changelist-actions a.button,
#grp-content .grp-changelist-actions .button {
  background: linear-gradient(135deg, var(--lg-admin-accent) 0%, var(--lg-admin-accent-2) 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  min-height: 36px !important;
  padding: 8px 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px rgba(139, 69, 255, 0.32) !important;
  text-shadow: none !important;
}

/* Force old "Go" / default admin action buttons away from legacy blue */
input.default,
button.default,
.default,
#changelist input[name="index"],
#changelist .actions .button,
#changelist .actions button {
  background: linear-gradient(135deg, var(--lg-admin-accent) 0%, var(--lg-admin-accent-2) 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* Grappelli screens.css conflict overrides */
html body.grp-app .grp-pagination ul li span,
html body.grp-app .grp-pagination ul li a,
html body.grp-change-list .grp-pagination ul li span,
html body.grp-change-list .grp-pagination ul li a {
  background: rgba(30, 17, 55, 0.92) !important;
  color: #f0ddff !important;
  border: 1px solid rgba(180, 123, 255, 0.28) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

html body.grp-app .grp-pagination ul li a:hover,
html body.grp-change-list .grp-pagination ul li a:hover {
  background: rgba(180, 123, 255, 0.18) !important;
  color: #fff !important;
}

html body.grp-app .grp-pulldown-container .grp-pulldown-handler,
html body.grp-change-list .grp-pulldown-container .grp-pulldown-handler {
  background: rgba(30, 17, 55, 0.92) !important;
  color: #f0ddff !important;
  border: 1px solid rgba(180, 123, 255, 0.28) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

html body.grp-app .grp-pulldown-container .grp-pulldown-handler:hover,
html body.grp-change-list .grp-pulldown-container .grp-pulldown-handler:hover {
  background: rgba(180, 123, 255, 0.18) !important;
  color: #fff !important;
}

.grp-fixed-footer {
  margin-bottom: 0 !important;
}

.grp-filter .grp-pulldown-container {
  border: 1px solid rgba(180, 123, 255, 0.28) !important;
  background: rgba(29, 16, 53, 0.9) !important;
  border-radius: 10px !important;
}

/* Grappelli pseudo dropdown handlers: always show arrow indicator */
.grp-pulldown-container .grp-pulldown-handler {
  position: relative !important;
  padding-right: 28px !important;
}

.grp-pulldown-container .grp-pulldown-handler::after {
  content: "▾" !important;
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

/* Final guard: footer module must never inherit generic module spacing */
#grp-content .grp-module.grp-fixed-footer,
#grp-content .grp-fixed-footer.grp-module,
#grp-content .grp-fixed-footer {
  margin-bottom: 0 !important;
}

/* Requested changelist toolbars background */
#grp-changelist-search,
#grp-content .grp-changelist-search,
#grp-content .grp-tools,
#grp-content .grp-changelist-actions,
#grp-content .grp-actions,
#grp-content .actions {
  background: rgb(40 36 51 / 13%) !important;
}

/* Override legacy Grappelli grey button/pulldown skin */
.button-state-grey,
.grp-pulldown-container .grp-pulldown-content,
.grp-pulldown-container .grp-pulldown-content:hover,
.grp-pulldown-container .grp-pulldown-handler,
.grp-pulldown-container .grp-pulldown-handler:hover,
button.ui-datetime-now:hover,
button.ui-timepicker-trigger:hover,
button.ui-datepicker-trigger:hover,
.grp-autocomplete-wrapper-fk a.related-lookup:hover,
a.related-lookup.m2m:hover,
.grp-autocomplete-wrapper-m2m a.related-lookup:hover,
input[type=button]:hover,
button:hover,
a.fb_show:hover,
a.related-lookup:hover,
body.tinyMCE input[name=src] + div a:hover,
body.tinyMCE input[name=href] + div a:hover {
  border: 1px solid rgba(180, 123, 255, 0.34) !important;
  background-color: rgba(44, 25, 80, 0.92) !important;
  background-image: linear-gradient(135deg, rgba(180, 123, 255, 0.35), rgba(139, 69, 255, 0.35)) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* Final action-bar override (must stay last) */
html body #changelist .actions,
html body #changelist-form .actions,
html body #grp-content .grp-actions,
html body #grp-content .grp-changelist-actions,
html body .grp-float-left.grp-changelist-actions {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Grappelli sort options styling */
html body table.grp-table .grp-sortoptions,
html body #grp-content table.grp-table .grp-sortoptions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  margin: 0 0 0 6px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  vertical-align: middle !important;
}

html body table.grp-table .grp-sortoptions a,
html body #grp-content table.grp-table .grp-sortoptions a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  font-size: 0 !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(180, 123, 255, 0.28) !important;
  background: rgba(29, 16, 53, 0.88) !important;
  color: #f0ddff !important;
  opacity: 1 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

html body table.grp-table .grp-sortoptions a::before,
html body #grp-content table.grp-table .grp-sortoptions a::before {
  display: block !important;
  line-height: 1 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  color: currentColor !important;
}

html body table.grp-table .grp-sortoptions a:first-child::before,
html body #grp-content table.grp-table .grp-sortoptions a:first-child::before {
  content: "S" !important;
}

html body table.grp-table .grp-sortoptions a:last-child::before,
html body #grp-content table.grp-table .grp-sortoptions a:last-child::before {
  content: "X" !important;
}

html body table.grp-table .grp-sortoptions a:hover,
html body #grp-content table.grp-table .grp-sortoptions a:hover {
  background: rgba(180, 123, 255, 0.26) !important;
  border-color: rgba(210, 170, 255, 0.5) !important;
  color: #ffffff !important;
}

html body table.grp-table .grp-sortoptions a:focus-visible,
html body #grp-content table.grp-table .grp-sortoptions a:focus-visible {
  outline: 2px solid #f8e9ff !important;
  outline-offset: 1px !important;
}

html body table.grp-table .grp-sortoptions .grp-sorted,
html body #grp-content table.grp-table .grp-sortoptions .grp-sorted,
html body table.grp-table .grp-sortoptions a.grp-sorted,
html body #grp-content table.grp-table .grp-sortoptions a.grp-sorted {
  background: linear-gradient(135deg, rgba(180, 123, 255, 0.42), rgba(139, 69, 255, 0.42)) !important;
  border-color: rgba(220, 186, 255, 0.58) !important;
  color: #ffffff !important;
}

html body table.grp-table .grp-sortoptions li,
html body #grp-content table.grp-table .grp-sortoptions li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Global popup theming (Grappelli/Django/jQuery UI popups) */
body.popup,
body.grp-popup,
body.popup #container,
body.grp-popup #container,
body.popup #content,
body.grp-popup #content,
body.popup #content-main,
body.grp-popup #content-main,
.ui-dialog,
.ui-widget.ui-widget-content,
.ui-dialog .ui-dialog-content {
  background: linear-gradient(140deg, rgba(29, 16, 53, 0.98), rgba(19, 11, 37, 0.98)) !important;
  color: var(--lg-admin-text) !important;
  border: 1px solid var(--lg-admin-border) !important;
  box-shadow: 0 16px 36px rgba(6, 3, 13, 0.42) !important;
}

.ui-dialog .ui-dialog-titlebar {
  background: linear-gradient(135deg, #1a0f34 0%, #2c1950 45%, #431f66 100%) !important;
  color: #fff !important;
  border: 1px solid var(--lg-admin-border) !important;
}

body.popup table,
body.grp-popup table {
  background: rgba(23, 12, 43, 0.96) !important;
  color: var(--lg-admin-text) !important;
}

body.popup input,
body.popup select,
body.popup textarea,
body.grp-popup input,
body.grp-popup select,
body.grp-popup textarea {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 1px solid rgba(200, 162, 255, 0.34) !important;
}

/* ========================================================================== */
/* Live Gemini Backoffice - Wallet style layer                                */
/* ========================================================================== */

html,
body,
#container,
#grp-container {
  font-family: "Poppins", "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif !important;
}

#grp-header #grp-navigation,
#header {
  min-height: 64px !important;
}

#grp-header #grp-user-tools .lg-admin-shortcut,
#user-tools .lg-admin-shortcut {
  background: linear-gradient(135deg, #ff4f9f 0%, #b94dff 100%) !important;
  color: #fff !important;
  border: 0 !important;
  font-size: 12px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

#grp-header #grp-user-tools .lg-admin-shortcut .lg-ico,
#user-tools .lg-admin-shortcut .lg-ico {
  margin-right: 0 !important;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  box-shadow: none;
}

/* Content shell spacing */
body.grp-app #grp-content-container,
body.grp-app #grp-content,
body.dashboard #grp-content-container,
body.dashboard #grp-content {
  padding-bottom: 16px !important;
}

#content {
  border: 1px solid rgba(180, 123, 255, 0.2) !important;
}

/* Messages/notices (save/update banners) */
.messagelist,
ul.messagelist,
#content .messagelist,
#grp-content .messagelist {
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
}

.messagelist li,
ul.messagelist li,
#content .messagelist li,
#grp-content .messagelist li,
.grp-messagelist li,
#grp-content ul.grp-messagelist li {
  list-style: none !important;
  margin: 0 0 10px 0 !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(180, 123, 255, 0.32) !important;
  background: linear-gradient(140deg, rgba(49, 29, 84, 0.96), rgba(29, 16, 55, 0.96)) !important;
  color: #f7efff !important;
  box-shadow: 0 10px 24px rgba(6, 3, 13, 0.35) !important;
}

.messagelist li.success,
#grp-content .messagelist li.success,
.grp-messagelist li.success {
  border-left: 4px solid #4ad483 !important;
}

.messagelist li.warning,
#grp-content .messagelist li.warning,
.grp-messagelist li.warning {
  border-left: 4px solid #ffbd42 !important;
}

.messagelist li.error,
.messagelist li.danger,
#grp-content .messagelist li.error,
#grp-content .messagelist li.danger,
.grp-messagelist li.error,
.grp-messagelist li.danger {
  border-left: 4px solid #ff5f7c !important;
}

/* Login */
body.login.lg-admin-login-page #container,
body.login.lg-admin-login-page #content,
body.login.lg-admin-login-page #content-main {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.login.lg-admin-login-page #header,
body.login.lg-admin-login-page #grp-header,
body.login.lg-admin-login-page .breadcrumbs,
body.login.lg-admin-login-page #grp-context-navigation {
  display: none !important;
}

.lg-admin-login-shell {
  width: min(560px, calc(100vw - 32px));
  margin: 48px auto 22px auto;
}

.lg-admin-login-card {
  border-radius: 20px;
  border: 1px solid rgba(196, 142, 255, 0.3);
  background:
    radial-gradient(circle at 20% 20%, rgba(220, 118, 255, 0.14), transparent 44%),
    radial-gradient(circle at 80% 82%, rgba(79, 126, 255, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(52, 27, 88, 0.96), rgba(24, 12, 48, 0.95));
  box-shadow: 0 18px 45px rgba(6, 3, 14, 0.45);
  padding: 24px;
}

.lg-admin-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.lg-admin-login-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(139, 69, 255, 0.35);
}

.lg-admin-login-brand-text h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  color: #fff !important;
}

.lg-admin-login-brand-text p {
  margin: 6px 0 0 0;
  color: rgba(233, 214, 255, 0.82);
}

.lg-admin-login-card .errornote,
.lg-admin-login-card ul.errorlist {
  border-radius: 10px;
  border: 1px solid rgba(255, 95, 124, 0.36);
  background: rgba(83, 20, 44, 0.52) !important;
  color: #ffd9e3 !important;
  padding: 10px 12px !important;
}

.lg-admin-login-card .form-row {
  margin-bottom: 14px !important;
}

.lg-admin-login-card .form-row label {
  display: block;
  margin-bottom: 7px;
  color: rgba(233, 214, 255, 0.95);
  font-weight: 600;
}

.lg-admin-login-card input[type="text"],
.lg-admin-login-card input[type="password"],
.lg-admin-login-card input[type="email"] {
  width: 100% !important;
  min-height: 44px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(201, 155, 255, 0.34) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  padding: 10px 12px !important;
}

.lg-admin-login-card .password-reset-link {
  margin: 6px 0 14px 0;
}

.lg-admin-login-card .password-reset-link a {
  color: #efdbff !important;
}

.lg-admin-login-card .submit-row {
  border-top: none !important;
  padding: 0 !important;
}

.lg-admin-login-card .submit-row input[type="submit"] {
  width: 100%;
  min-height: 44px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  background: linear-gradient(135deg, #9146ff 0%, #ff4fa3 100%) !important;
}

/* Dashboard control center */
.lg-admin-dashboard-page #content {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 14px 0 0 0 !important;
}

.lg-admin-dashboard-page #content-main.lg-cc-shell {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.lg-cc-sidebar,
.lg-cc-main {
  border: 1px solid rgba(185, 129, 255, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 18%, rgba(220, 118, 255, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(41, 23, 73, 0.94), rgba(23, 12, 46, 0.92));
  box-shadow: 0 14px 34px rgba(6, 3, 13, 0.35);
}

.lg-cc-sidebar {
  padding: 14px;
  position: sticky;
  top: 84px;
  align-self: start;
}

.lg-cc-main {
  padding: 16px;
}

.lg-cc-side-head h2 {
  margin: 0;
  font-size: 19px;
}

.lg-cc-side-head p {
  margin: 6px 0 0 0;
  color: rgba(216, 194, 247, 0.82);
  font-size: 13px;
}

.lg-cc-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.lg-cc-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #f0dfff !important;
  border: 1px solid rgba(180, 123, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none !important;
  font-weight: 600;
}

.lg-cc-nav a:hover {
  border-color: rgba(216, 172, 255, 0.48);
  background: rgba(166, 96, 255, 0.16);
}

.lg-cc-meta {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.lg-cc-kpi {
  border-radius: 12px;
  border: 1px solid rgba(180, 123, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.lg-cc-kpi .label {
  color: rgba(216, 194, 247, 0.78);
  font-size: 12px;
}

.lg-cc-kpi .value {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.lg-cc-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(180, 123, 255, 0.2);
}

.lg-cc-hero h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.15;
}

.lg-cc-hero p {
  margin: 8px 0 0 0;
  color: rgba(216, 194, 247, 0.84);
}

.lg-cc-search-wrap {
  width: min(440px, 100%);
}

.lg-cc-search-wrap input {
  width: 100%;
  min-height: 42px;
  border-radius: 12px !important;
  border: 1px solid rgba(201, 155, 255, 0.34) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: #fff !important;
  padding: 10px 12px !important;
}

.lg-cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.lg-cc-card {
  border-radius: 14px;
  border: 1px solid rgba(180, 123, 255, 0.24);
  background: linear-gradient(155deg, rgba(39, 20, 67, 0.94), rgba(24, 12, 47, 0.92));
  padding: 12px;
}

.lg-cc-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.lg-cc-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.lg-cc-card-head span {
  font-size: 12px;
  color: rgba(216, 194, 247, 0.76);
}

.lg-cc-model-list {
  list-style: none;
  margin: 10px 0 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.lg-cc-model-row {
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 123, 255, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.lg-cc-model-row .model-name {
  font-weight: 600;
}

.lg-cc-model-row .actions {
  display: inline-flex;
  gap: 6px;
}

.lg-cc-model-row .actions a {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid rgba(199, 155, 255, 0.3);
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff !important;
  background: rgba(170, 99, 255, 0.16);
}

.lg-cc-model-row .actions a:hover {
  background: rgba(201, 133, 255, 0.28);
}

.lg-cc-model-row.empty {
  color: rgba(216, 194, 247, 0.7);
  font-style: italic;
}

@media (max-width: 1200px) {
  .lg-admin-dashboard-page #content-main.lg-cc-shell {
    grid-template-columns: 1fr;
  }
  .lg-cc-sidebar {
    position: relative;
    top: auto;
  }
}

/* Command palette */
.lg-admin-palette {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 4, 18, 0.62);
  backdrop-filter: blur(4px);
  display: none;
}

.lg-admin-palette.open {
  display: block;
}

.lg-admin-palette-inner {
  width: min(760px, calc(100vw - 30px));
  margin: 70px auto 0 auto;
  border: 1px solid rgba(185, 129, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(220, 118, 255, 0.12), transparent 44%),
    linear-gradient(145deg, rgba(41, 23, 73, 0.96), rgba(23, 12, 46, 0.95));
  box-shadow: 0 22px 50px rgba(6, 3, 13, 0.52);
}

.lg-admin-palette-head {
  padding: 12px;
  border-bottom: 1px solid rgba(185, 129, 255, 0.24);
}

.lg-admin-palette-head input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px !important;
  border: 1px solid rgba(201, 155, 255, 0.34) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  padding: 10px 12px !important;
}

.lg-admin-palette-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: min(68vh, 520px);
  overflow: auto;
}

.lg-admin-palette-list li a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none !important;
  padding: 9px 10px;
  border-radius: 10px;
  color: #f3e4ff !important;
}

.lg-admin-palette-list li a:hover {
  background: rgba(166, 96, 255, 0.17);
}

.lg-admin-palette-list li a .name {
  font-weight: 600;
}

.lg-admin-palette-list li a .path {
  font-size: 11px;
  color: rgba(216, 194, 247, 0.75);
}

/* Density toggle */
body.lg-density-compact table.grp-table thead th,
body.lg-density-compact #changelist thead th {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

body.lg-density-compact table.grp-table tbody td,
body.lg-density-compact table.grp-table tbody th,
body.lg-density-compact #changelist tbody td,
body.lg-density-compact #changelist tbody th {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

body.lg-density-compact .module,
body.lg-density-compact .grp-module {
  margin-bottom: 10px !important;
}

body.lg-density-comfortable table.grp-table tbody td,
body.lg-density-comfortable table.grp-table tbody th,
body.lg-density-comfortable #changelist tbody td,
body.lg-density-comfortable #changelist tbody th {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* Keep content top visible on every admin page (no sticky clipping) */
#header,
#grp-header,
#grp-context-navigation,
.breadcrumbs {
  position: relative !important;
  top: auto !important;
}

/* Higher contrast text */
#container,
#container *,
#grp-container,
#grp-container * {
  color: #ffffff;
}

#container a,
#grp-container a {
  color: #ffffff !important;
}

/* -------------------------------------------------------------------------- */
/* CMS Sidebar + Global Search                                                */
/* -------------------------------------------------------------------------- */
body.lg-admin-cms-enabled #grp-content-container,
body.lg-admin-cms-enabled #content {
  margin-left: 252px !important;
}

.lg-admin-cms-sidebar {
  position: fixed;
  left: 12px;
  top: 96px;
  width: 224px;
  z-index: 90;
  border: 1px solid rgba(185, 129, 255, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 14%, rgba(220, 118, 255, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(41, 23, 73, 0.96), rgba(23, 12, 46, 0.95));
  box-shadow: 0 14px 34px rgba(6, 3, 13, 0.4);
  padding: 10px;
}

.lg-admin-cms-brand {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.lg-admin-cms-search {
  margin-bottom: 10px;
}

.lg-admin-cms-search input {
  width: 100%;
  min-height: 36px;
  border-radius: 10px !important;
  border: 1px solid rgba(201, 155, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  padding: 8px 10px !important;
}

.lg-admin-cms-nav {
  display: grid;
  gap: 7px;
}

.lg-admin-cms-nav a {
  text-decoration: none !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  border: 1px solid rgba(180, 123, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.lg-admin-cms-nav a:hover {
  background: rgba(166, 96, 255, 0.18);
  border-color: rgba(216, 172, 255, 0.48);
}

#lgAdminCmsCommand {
  width: 100%;
  margin-top: 10px;
  min-height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(180, 123, 255, 0.35);
  background: linear-gradient(135deg, rgba(180, 123, 255, 0.35), rgba(139, 69, 255, 0.32));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* Admin Home                                                                  */
/* -------------------------------------------------------------------------- */
.lg-home-shell {
  padding: 8px 6px 12px;
}

.lg-home-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-radius: 16px;
  border: 1px solid rgba(185, 129, 255, 0.26);
  background:
    radial-gradient(circle at 18% 18%, rgba(220, 118, 255, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(41, 23, 73, 0.95), rgba(23, 12, 46, 0.93));
  box-shadow: 0 14px 34px rgba(6, 3, 13, 0.35);
  padding: 18px 20px;
}

.lg-home-header-card h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  color: #fff !important;
}

.lg-home-header-card p {
  margin: 8px 0 0;
  color: #fff;
  opacity: 0.92;
  max-width: 900px;
}

.lg-home-header-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.lg-home-toolbar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(185, 129, 255, 0.22);
  background: rgba(33, 18, 61, 0.84);
  padding: 10px;
}

.lg-home-toolbar input {
  min-height: 38px;
  border-radius: 10px !important;
  border: 1px solid rgba(201, 155, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  padding: 8px 10px !important;
}

.lg-home-toolbar-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lg-home-toolbar-links a {
  text-decoration: none !important;
  color: #fff !important;
  border-radius: 999px;
  border: 1px solid rgba(185, 129, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.lg-home-toolbar-links a:hover {
  background: rgba(166, 96, 255, 0.18);
}

.lg-home-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr);
  gap: 14px;
}

.lg-home-main {
  display: grid;
  gap: 12px;
}

.lg-home-app,
.lg-home-side {
  border-radius: 14px;
  border: 1px solid rgba(185, 129, 255, 0.22);
  background: linear-gradient(145deg, rgba(41, 23, 73, 0.94), rgba(23, 12, 46, 0.92));
  box-shadow: 0 10px 24px rgba(6, 3, 13, 0.32);
  overflow: hidden;
}

.lg-home-app-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lg-home-app-head h3 {
  margin: 0;
  font-size: 18px;
  color: #fff !important;
}

.lg-home-app-head span {
  color: #fff;
  opacity: 0.9;
  font-size: 12px;
}

.lg-home-models {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lg-home-models li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lg-home-models li .name {
  color: #fff;
  font-weight: 700;
}

.lg-home-models li .actions {
  display: inline-flex;
  gap: 6px;
}

.lg-home-models li .actions a {
  text-decoration: none !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(185, 129, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  padding: 5px 10px;
}

.lg-home-models li .actions a:hover {
  background: rgba(166, 96, 255, 0.18);
}

.lg-home-side h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 20px;
  color: #fff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lg-home-actions {
  margin: 0;
  padding: 8px 12px 12px;
  list-style: none;
}

.lg-home-actions li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
}

.lg-home-actions li:first-child {
  border-top: none;
}

.lg-home-actions .obj {
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.lg-home-actions .meta {
  display: block;
  color: #fff;
  opacity: 0.85;
  margin-top: 3px;
  font-size: 12px;
}

.empty {
  color: #fff;
  opacity: 0.85;
}

@media (max-width: 1440px) {
  body.lg-admin-cms-enabled #grp-content-container,
  body.lg-admin-cms-enabled #content {
    margin-left: 238px !important;
  }
  .lg-admin-cms-sidebar {
    width: 210px;
  }
}

@media (max-width: 1279px) {
  body.lg-admin-cms-enabled #grp-content-container,
  body.lg-admin-cms-enabled #content {
    margin-left: 0 !important;
  }
  .lg-admin-cms-sidebar {
    display: none !important;
  }
  .lg-home-grid {
    grid-template-columns: 1fr;
  }
  .lg-home-toolbar {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* Global consistency pass for all custom admin views                          */
/* -------------------------------------------------------------------------- */

/* Uniform toolbar/filter row controls */
.refmod-filters input,
.refmod-filters select,
.refmod-filters button,
.lglist-filter select,
.lglist-filter input,
.email-inline-form input,
.email-inline-form select,
.email-inline-form button,
.analytics-shell input,
.analytics-shell select,
.analytics-shell button,
.ui-shell input,
.ui-shell select,
.ui-shell button,
.wc-shell input,
.wc-shell select,
.wc-shell button,
.gi-shell input,
.gi-shell select,
.gi-shell button {
  min-height: 42px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

/* Keep buttons visually aligned with inputs */
.refmod-filters button,
.lglist-back,
.email-link-btn,
.email-submit-btn,
.ui-cta,
.wc-range a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix odd pseudo artifacts in referral action row */
.refmod-filters button::before,
.refmod-filters button::after {
  content: none !important;
}

/* Ensure referral toolbar columns breathe uniformly */
.refmod-filters {
  align-items: stretch !important;
}

/* Unified card/table shell look */
.analytics-card,
.refmod-card,
.lglist-card,
.email-admin-card,
.ui-card,
.ui-table-wrap,
.wc-card,
.wc-wrap,
.gi-card,
.gi-wrap,
.lg-home-app,
.lg-home-side {
  background: linear-gradient(145deg, rgba(41, 23, 73, 0.95), rgba(23, 12, 46, 0.93)) !important;
  border: 1px solid rgba(185, 129, 255, 0.24) !important;
  box-shadow: 0 12px 30px rgba(6, 3, 13, 0.34) !important;
  color: #fff !important;
}

/* Normalize headers/titles */
.analytics-card h3,
.refmod-title,
.lglist-title,
.email-admin-title,
.ui-hero h1,
.wc-hero h1,
.gi-hero h1,
.gi-title,
.wc-title,
.ui-table-title,
.lg-home-side h3,
.lg-home-app-head h3 {
  color: #fff !important;
}

/* Remove legacy blue/white style from group insights */
.gi-hero {
  background: linear-gradient(145deg, rgba(41, 23, 73, 0.96), rgba(23, 12, 46, 0.94)) !important;
  border: 1px solid rgba(185, 129, 255, 0.24) !important;
  box-shadow: 0 12px 30px rgba(6, 3, 13, 0.34) !important;
}

.gi-sub,
.ui-sub,
.wc-sub,
.email-admin-sub,
.lglist-filter label,
.ui-k,
.wc-k,
.gi-k {
  color: #ffffff !important;
  opacity: 0.9 !important;
}

/* Make tables consistent and readable */
.analytics-table th,
.refmod-table th,
.lglist-table th,
.email-admin-table th,
.ui-table th,
.wc-table th,
.gi-table th {
  color: #ffffff !important;
  background: linear-gradient(180deg, rgba(56, 33, 92, 0.98), rgba(31, 17, 57, 0.98)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.analytics-table td,
.refmod-table td,
.lglist-table td,
.email-admin-table td,
.ui-table td,
.wc-table td,
.gi-table td {
  color: #ffffff !important;
}

/* Keep row spacing coherent */
.analytics-table th,
.analytics-table td,
.refmod-table th,
.refmod-table td,
.email-admin-table th,
.email-admin-table td,
.ui-table th,
.ui-table td,
.wc-table th,
.wc-table td,
.gi-table th,
.gi-table td {
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}

/* -------------------------------------------------------------------------- */
/* Wallet-aligned visual skin (final pass)                                     */
/* -------------------------------------------------------------------------- */
:root {
  --lg-wallet-surface: rgba(255, 255, 255, 0.04);
  --lg-wallet-surface-strong: rgba(255, 255, 255, 0.06);
  --lg-wallet-border: rgba(139, 69, 255, 0.18);
  --lg-wallet-border-strong: rgba(139, 69, 255, 0.32);
  --lg-wallet-muted: rgba(255, 255, 255, 0.58);
  --lg-wallet-btn: linear-gradient(90deg, #ff3f8f 0%, #b94dff 100%);
}

html body,
html body #container,
html body #grp-container {
  background:
    radial-gradient(circle at 14% 0%, rgba(139, 69, 255, 0.15), transparent 45%),
    radial-gradient(circle at 88% 100%, rgba(255, 63, 143, 0.08), transparent 38%),
    linear-gradient(180deg, #0f0721 0%, #13082a 45%, #0d0620 100%) !important;
}

#content,
#content-main,
#grp-content,
.module,
.grp-module,
.inline-group,
.grp-group,
.grp-row,
.dashboard .module,
.analytics-card,
.refmod-card,
.lglist-card,
.email-admin-card,
.ui-card,
.ui-table-wrap,
.wc-card,
.wc-wrap,
.gi-card,
.gi-wrap,
.lg-home-app,
.lg-home-side,
.lg-home-header-card,
.lg-home-toolbar {
  background: var(--lg-wallet-surface) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--lg-wallet-border) !important;
  box-shadow: 0 12px 30px rgba(6, 3, 13, 0.36) !important;
}

.analytics-hero,
.ui-hero,
.wc-hero,
.gi-hero {
  background:
    radial-gradient(circle at 20% 10%, rgba(139, 69, 255, 0.22), transparent 45%),
    linear-gradient(145deg, rgba(34, 18, 61, 0.92), rgba(21, 11, 43, 0.92)) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--lg-wallet-border-strong) !important;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
.object-tools a,
.addlink,
.changelink,
.deletelink,
.lg-home-toolbar-links a,
.lglist-back,
.email-link-btn,
.email-submit-btn,
.ui-cta,
.refmod-link,
.refmod-filters button,
.wc-range a {
  background: var(--lg-wallet-btn) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 26px rgba(185, 77, 255, 0.28) !important;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
.object-tools a:hover,
.lg-home-toolbar-links a:hover,
.lglist-back:hover,
.email-link-btn:hover,
.email-submit-btn:hover,
.ui-cta:hover,
.refmod-link:hover,
.refmod-filters button:hover,
.wc-range a:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select,
.vTextField,
.vLargeTextField {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid var(--lg-wallet-border-strong) !important;
  color: #fff !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--lg-wallet-muted) !important;
}

table th,
.analytics-table th,
.refmod-table th,
.lglist-table th,
.email-admin-table th,
.ui-table th,
.wc-table th,
.gi-table th {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

table td,
.analytics-table td,
.refmod-table td,
.lglist-table td,
.email-admin-table td,
.ui-table td,
.wc-table td,
.gi-table td {
  color: #fff !important;
}

.lg-home-header-card p,
.lg-home-toolbar-links,
.ui-sub,
.wc-sub,
.gi-sub,
.email-admin-sub,
.lglist-filter label,
.ui-k,
.wc-k,
.gi-k {
  color: var(--lg-wallet-muted) !important;
}

/* -------------------------------------------------------------------------- */
/* Final wallet parity overrides                                               */
/* -------------------------------------------------------------------------- */

html body,
html body #container,
html body #grp-container {
  background:
    radial-gradient(1100px 520px at 8% -5%, rgba(126, 87, 255, 0.18), transparent 62%),
    radial-gradient(980px 460px at 92% 0%, rgba(255, 78, 166, 0.1), transparent 58%),
    linear-gradient(180deg, #0b0717 0%, #10091f 36%, #0d081b 72%, #090615 100%) !important;
}

/* Header should blend instead of heavy flat purple */
#header,
#grp-header {
  background:
    radial-gradient(600px 180px at 20% 0%, rgba(139, 69, 255, 0.2), transparent 65%),
    linear-gradient(180deg, rgba(29, 16, 53, 0.96), rgba(21, 11, 43, 0.96)) !important;
  border-bottom: 1px solid rgba(180, 123, 255, 0.22) !important;
  box-shadow: 0 12px 28px rgba(6, 3, 13, 0.34) !important;
}

#grp-context-navigation,
.breadcrumbs {
  background: rgba(23, 12, 46, 0.88) !important;
  border-color: rgba(180, 123, 255, 0.24) !important;
}

/* Buttons: force perfect vertical text alignment */
.button,
input[type="submit"],
input[type="button"],
.submit-row input,
.object-tools a,
.addlink,
.changelink,
.deletelink,
.lg-home-toolbar-links a,
.lglist-back,
.email-link-btn,
.email-submit-btn,
.ui-cta,
.refmod-link,
.refmod-filters button,
.wc-range a,
#grp-user-tools > li > a,
#grp-user-tools li.grp-dashboard-link a,
#user-tools a.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  text-align: center !important;
  line-height: 1 !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Search button etc should not collapse text baseline */
#lgQuickSearchToggle,
#lgDensityToggle,
.lg-home-header-actions .button {
  min-height: 46px !important;
  border-radius: 16px !important;
}

/* Inputs/selects height sync with buttons */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select,
.vTextField,
.vLargeTextField,
.refmod-filters input,
.refmod-filters select,
.lg-home-toolbar input,
.email-inline-form input {
  min-height: 44px !important;
  border-radius: 14px !important;
}

/* Table style parity with wallet cards */
.analytics-table,
.refmod-table,
.lglist-table,
.email-admin-table,
.ui-table,
.wc-table,
.gi-table,
table.grp-table,
#changelist table#result_list {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
}

.analytics-table th,
.refmod-table th,
.lglist-table th,
.email-admin-table th,
.ui-table th,
.wc-table th,
.gi-table th,
table.grp-table thead th,
#changelist table#result_list thead th {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.analytics-table td,
.refmod-table td,
.lglist-table td,
.email-admin-table td,
.ui-table td,
.wc-table td,
.gi-table td,
table.grp-table tbody td,
#changelist table#result_list tbody td {
  background: rgba(255, 255, 255, 0.015) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.analytics-table tbody tr:hover td,
.refmod-table tbody tr:hover td,
.lglist-table tbody tr:hover td,
.email-admin-table tbody tr:hover td,
.ui-table tbody tr:hover td,
.wc-table tbody tr:hover td,
.gi-table tbody tr:hover td,
table.grp-table tbody tr:hover td,
#changelist table#result_list tbody tr:hover td {
  background: rgba(180, 123, 255, 0.11) !important;
}

/* -------------------------------------------------------------------------- */
/* Icon System (wallet-style contextual icons)                                 */
/* -------------------------------------------------------------------------- */
.lg-ico {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.95;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.lg-ico-home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E"); }
.lg-ico-analytics { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M4 20V4'/%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M8 16v-5'/%3E%3Cpath d='M12 16V9'/%3E%3Cpath d='M16 16v-8'/%3E%3Cpath d='M20 16v-3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M4 20V4'/%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M8 16v-5'/%3E%3Cpath d='M12 16V9'/%3E%3Cpath d='M16 16v-8'/%3E%3Cpath d='M20 16v-3'/%3E%3C/svg%3E"); }
.lg-ico-mail { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); }
.lg-ico-shield { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M12 3 5 6v6c0 5 3.5 8 7 9 3.5-1 7-4 7-9V6l-7-3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='M12 3 5 6v6c0 5 3.5 8 7 9 3.5-1 7-4 7-9V6l-7-3z'/%3E%3C/svg%3E"); }
.lg-ico-users { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='17' cy='9' r='2.5'/%3E%3Cpath d='M3 20c0-3 2.4-5 6-5s6 2 6 5'/%3E%3Cpath d='M14 20c0-2.2 1.8-4 4.5-4 1 0 1.8.2 2.5.6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='17' cy='9' r='2.5'/%3E%3Cpath d='M3 20c0-3 2.4-5 6-5s6 2 6 5'/%3E%3Cpath d='M14 20c0-2.2 1.8-4 4.5-4 1 0 1.8.2 2.5.6'/%3E%3C/svg%3E"); }
.lg-ico-settings { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='m12 2 1.7 2.7 3.1.5.5 3.1L20 10l-1.6 2 1.6 2-2.7 1.7-.5 3.1-3.1.5L12 22l-1.7-2.7-3.1-.5-.5-3.1L4 14l1.6-2L4 10l2.7-1.7.5-3.1 3.1-.5L12 2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.9'%3E%3Cpath d='m12 2 1.7 2.7 3.1.5.5 3.1L20 10l-1.6 2 1.6 2-2.7 1.7-.5 3.1-3.1.5L12 22l-1.7-2.7-3.1-.5-.5-3.1L4 14l1.6-2L4 10l2.7-1.7.5-3.1 3.1-.5L12 2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.lg-ico-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.lg-ico-plus { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.lg-ico-edit { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M4 20h4l10-10-4-4L4 16v4z'/%3E%3Cpath d='m12 6 4 4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M4 20h4l10-10-4-4L4 16v4z'/%3E%3Cpath d='m12 6 4 4'/%3E%3C/svg%3E"); }
.lg-ico-export { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E"); }
.lg-ico-clock { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }

.lg-admin-cms-nav a .lg-ico,
.lg-home-toolbar-links a .lg-ico,
.lg-home-models .actions a .lg-ico,
.lg-home-header-actions .button .lg-ico,
.lg-admin-shortcut .lg-ico,
.lg-cc-nav a .lg-ico,
.lg-cc-model-row .actions a .lg-ico,
.refmod-link .lg-ico,
.refmod-btn .lg-ico,
.members-btn .lg-ico,
.members-close .lg-ico,
.quick-link .lg-ico {
  margin-right: 7px;
}

/* icon-only button for email send */
.email-submit-icon {
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
}

.email-submit-icon .lg-ico {
  margin-right: 0 !important;
}

/* Changelist/filter dropdown stacking fixes (settings page etc) */
#changelist,
#changelist-form,
#content,
#grp-content,
#grp-content-container {
  overflow: visible !important;
}

#changelist-filter,
#grp-content #changelist-filter,
.grp-filter {
  position: relative !important;
  z-index: 80 !important;
  overflow: visible !important;
}

.grp-pulldown-container {
  position: relative !important;
  z-index: 95 !important;
  overflow: visible !important;
}

.grp-pulldown-container .grp-pulldown-content {
  position: absolute !important;
  z-index: 120 !important;
  background: rgba(24, 12, 46, 0.98) !important;
  border: 1px solid rgba(180, 123, 255, 0.35) !important;
  border-radius: 10px !important;
  box-shadow: 0 18px 40px rgba(6, 3, 13, 0.48) !important;
}

.grp-pulldown-container .grp-pulldown-content li a,
.grp-pulldown-container .grp-pulldown-content li span {
  color: #fff !important;
}

#changelist .results,
#changelist-form .results,
#grp-content .grp-results {
  position: relative !important;
  z-index: 1 !important;
}

/* "Open" links in list tables should look like modern action chips */
.lglist-table td a,
.analytics-table td a,
.ui-table td a,
.wc-table td a,
.gi-table td a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #fff !important;
  font-weight: 700 !important;
}
