:root {
  --cx-top-h: 65px;
  --cx-work-top-h: 0px;
  --cx-work-top-safe-h: 0px;
  --cx-footer-h: 0px;
  --cx-side-w: 290px;

  --cx-bg: #0b1320;
  --cx-panel: #111d2f;
  --cx-panel-2: #18263a;
  --cx-border: rgba(255, 255, 255, 0.12);
  --cx-text: #dbe5f3;
  --cx-muted: #9fb0c7;
  --cx-accent: #1e90ff;
  --cx-accent-soft: rgba(30, 144, 255, 0.2);
}

html.cx-theme-light,
html[data-theme='light'],
body.cx-theme-light,
body.theme-light,
body[data-theme='light'] {
  --cx-bg: #eef3f8;
  --cx-panel: #ffffff;
  --cx-panel-2: #f8fbff;
  --cx-border: rgba(12, 32, 65, 0.16);
  --cx-text: #10233d;
  --cx-muted: #4b617e;
  --cx-accent: #0b6bdc;
  --cx-accent-soft: rgba(11, 107, 220, 0.16);
}

html,
body {
  height: 100%;
}

/* AdminJS inyecta un reset inline con: html, body, #app { width:100%; height:100% }.
   En /admin/pages/* queremos scroll "normal" (document flow), asi que anulamos ese size fijo. */
html.cx-admin-pages,
html.cx-admin-pages body,
html.cx-admin-pages #app {
  width: auto !important;
  height: auto !important;
}

body.cx-shell-ready section[data-css="topbar"],
body.cx-shell-ready aside[data-css="sidebar"],
body.cx-shell-ready section[data-css="sidebar"] {
  display: none !important;
}

/* Global compact titles: reduce AdminJS H4 headers across all pages. */
body.cx-shell-ready .cx-panel-center h4,
body.cx-shell-ready .cx-panel-center .adminjs_H4,
body.cx-shell-ready .cx-panel-center .adminjs_Header.adminjs_H4,
body .adminjs_H4.adminjs_Header {
  font-size: 18px !important; /* match H2 visual size */
  line-height: 1.2 !important;
  margin: 10px 0 !important;
}

/* Light theme: darker headings for better readability. */
html.cx-theme-light body.cx-shell-ready .cx-panel-center h1,
html.cx-theme-light body.cx-shell-ready .cx-panel-center h2,
html.cx-theme-light body.cx-shell-ready .cx-panel-center h3,
html.cx-theme-light body.cx-shell-ready .cx-panel-center h4,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_H1,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_H2,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_H3,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_H4,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_Header.adminjs_H1,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_Header.adminjs_H2,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_Header.adminjs_H3,
html.cx-theme-light body.cx-shell-ready .cx-panel-center .adminjs_Header.adminjs_H4 {
  color: #3d3a3a !important;
}

/* Global grid typography: compact table text across all pages. */
body.cx-shell-ready .cx-panel-center table th,
body.cx-shell-ready .cx-panel-center table td,
body.cx-shell-ready .cx-panel-center .adminjs_TableCell {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Compact mode (desktop): reduce font-size + paddings (AdminJS is quite spacious by default). */
@media (min-width: 901px) {
  body.cx-shell-ready .cx-panel-center {
    font-size: 13px;
  }

  body.cx-shell-ready .cx-panel-center h1,
  body.cx-shell-ready .cx-panel-center .adminjs_H1 {
    font-size: 26px !important;
    line-height: 1.15 !important;
    margin: 10px 0 12px !important;
  }

  body.cx-shell-ready .cx-panel-center h2,
  body.cx-shell-ready .cx-panel-center .adminjs_H2 {
    font-size: 18px !important;
    line-height: 1.2 !important;
    margin: 10px 0 10px !important;
  }

  body.cx-shell-ready .cx-panel-center table th,
  body.cx-shell-ready .cx-panel-center table td {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  body.cx-shell-ready .cx-panel-center input,
  body.cx-shell-ready .cx-panel-center select,
  body.cx-shell-ready .cx-panel-center textarea {
    font-size: 13px !important;
    padding: 6px 8px !important;
  }

  body.cx-shell-ready .cx-panel-center button {
    font-size: 13px !important;
    padding: 6px 10px !important;
  }
}

#concilux-shell {
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.cx-panel-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--cx-top-h);
  background: var(--cx-panel);
  border-bottom: 1px solid var(--cx-border);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 12px;
}

.cx-workspace-top {
  display: none;
}

body.cx-shell-ready.cx-with-sidebar .cx-workspace-top.open {
  display: block;
  position: fixed;
  top: var(--cx-top-h);
  left: var(--cx-side-w);
  right: 0;
  height: 44px;
  background: var(--cx-panel);
  border-bottom: 1px solid var(--cx-border);
  z-index: 9090;
}

body.cx-shell-ready.cx-with-sidebar.cx-sidebar-collapsed .cx-workspace-top.open {
  left: 0;
}

.cx-workspace-top-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
}

.cx-workspace-top-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cx-text);
}

.cx-workspace-top-year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cx-workspace-top-year label {
  font-size: 12px;
  color: var(--cx-muted);
}

.cx-workspace-top-year .cx-work-year-select {
  min-width: 136px;
  position: relative;
}

.cx-workspace-top-year .cx-year-control {
  border: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
  color: var(--cx-text);
  border-radius: 8px;
  font-size: 13px;
  min-height: 34px;
  height: 34px;
  min-width: 136px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: none;
  cursor: pointer;
}

.cx-workspace-top-year .cx-year-control:hover {
  border-color: var(--cx-accent);
}

.cx-workspace-top-year .cx-work-year-select.is-open .cx-year-control {
  border-color: var(--cx-accent);
}

.cx-workspace-top-year .cx-year-control .css-k21zfa-ValueContainer {
  padding-left: 10px;
  padding-right: 6px;
}

.cx-workspace-top-year .cx-year-control [class*='ValueContainer'] {
  min-height: 32px;
  height: 32px;
  padding-left: 10px;
  padding-right: 6px;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.cx-workspace-top-year .cx-year-control .css-bysrk6-singleValue {
  color: var(--cx-text);
  margin-left: 0;
}

.cx-workspace-top-year .cx-year-control [class*='singleValue'] {
  color: var(--cx-text);
  margin-left: 0;
  margin-right: 0;
  top: auto;
  transform: none;
  line-height: 1.15;
}

.cx-workspace-top-year .cx-year-control .css-1eidkuc-Input {
  margin: 0;
  padding: 0;
}

.cx-workspace-top-year .cx-year-control .css-1eidkuc-Input input {
  display: none;
}

.cx-workspace-top-year .cx-year-control .css-1hb7zxy-IndicatorsContainer {
  color: var(--cx-muted);
}

.cx-workspace-top-year .cx-year-control [class*='IndicatorsContainer'] {
  min-height: 32px;
  height: 32px;
  width: auto;
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  color: var(--cx-muted);
}

.cx-workspace-top-year .cx-year-control .css-s6708v-indicatorContainer {
  color: var(--cx-muted);
  padding: 6px;
}

.cx-workspace-top-year .cx-year-control [class*='indicatorContainer'] {
  color: var(--cx-muted);
  padding: 4px 6px;
  min-height: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
}

.cx-workspace-top-year .cx-year-control .css-s6708v-indicatorContainer svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cx-workspace-top-year .cx-year-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--cx-panel);
  border: 1px solid var(--cx-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  padding: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.cx-workspace-top-year .cx-year-menu.open {
  display: block;
}

.cx-workspace-top-year .cx-year-option {
  border-radius: 6px;
  color: var(--cx-text);
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
}

.cx-workspace-top-year .cx-year-option:hover {
  background: var(--cx-panel-2);
}

.cx-workspace-top-year .cx-year-option.is-selected {
  background: var(--cx-accent-soft);
  color: var(--cx-text);
}

.cx-login-theme-toggle {
  display: none;
}

/* Login: show a small floating theme toggle so it works before auth. */
#cx-login-theme-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2147483001;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--cx-border);
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(10px);
}

html.cx-theme-light #cx-login-theme-toggle,
html[data-theme='light'] #cx-login-theme-toggle,
body.cx-theme-light #cx-login-theme-toggle,
body.theme-light #cx-login-theme-toggle {
  background: rgba(255, 255, 255, 0.82);
}

/* Login theme application (AdminJS login screen). */
body.cx-login-page {
  background: var(--cx-bg) !important;
  color: var(--cx-text) !important;
}

body.cx-login-page #app {
  background: transparent !important;
}

/* AdminJS login wrapper keeps a light gray background by default. */
body.cx-login-page .login__Wrapper,
body.cx-login-page section[class*='login__Wrapper'] {
  background: var(--cx-bg) !important;
}

body.cx-login-page .cx-login-card {
  background: var(--cx-panel) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28) !important;
}

body.cx-login-page .cx-login-left {
  background: linear-gradient(165deg, #1d4ed8 0%, #2563eb 52%, #0ea5e9 100%) !important;
  color: #eef7ff !important;
}

html.cx-theme-light body.cx-login-page .cx-login-left,
html[data-theme='light'] body.cx-login-page .cx-login-left,
body.cx-theme-light.cx-login-page .cx-login-left,
body.theme-light.cx-login-page .cx-login-left {
  background: linear-gradient(165deg, #2563eb 0%, #3b82f6 58%, #60a5fa 100%) !important;
  color: #f8fbff !important;
}

body.cx-login-page .cx-login-right {
  background: var(--cx-panel-2) !important;
  color: var(--cx-text) !important;
}

body.cx-login-page form[action="/admin/login"] {
  color: var(--cx-text) !important;
}

body.cx-login-page form[action="/admin/login"] input,
body.cx-login-page .cx-login-form input {
  background: var(--cx-panel) !important;
  color: var(--cx-text) !important;
  border: 1px solid var(--cx-border) !important;
}

body.cx-login-page form[action="/admin/login"] input::placeholder,
body.cx-login-page .cx-login-form input::placeholder {
  color: var(--cx-muted) !important;
}

body.cx-login-page form[action="/admin/login"] button[type='submit'],
body.cx-login-page .cx-login-form button[type='submit'] {
  background: var(--cx-accent) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
}

body.cx-login-page form[action="/admin/login"] button[type='submit']:hover,
body.cx-login-page .cx-login-form button[type='submit']:hover {
  filter: brightness(1.05);
}

.cx-top-left,
.cx-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cx-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cx-text) !important;
  text-decoration: none !important;
  margin-right: 8px;
}

.cx-brand img {
  width: 140px;
  height: auto;
}

.cx-top-link {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cx-text) !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
}

.cx-top-link:hover {
  border-color: var(--cx-border);
  background: var(--cx-panel-2);
}

.cx-top-link.active {
  border-color: var(--cx-accent);
  background: var(--cx-accent-soft);
}

.cx-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
  color: var(--cx-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cx-icon-btn:hover {
  border-color: var(--cx-accent);
}

.cx-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cx-user-wrap {
  position: relative;
}

.cx-user-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.cx-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cx-text);
  font-size: 13px;
  font-weight: 700;
}

.cx-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-border);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  padding: 8px;
  display: none;
}

.cx-user-menu.open {
  display: block;
}

.cx-user-title {
  font-size: 12px;
  color: var(--cx-muted);
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--cx-border);
  margin-bottom: 6px;
}

.cx-user-menu a {
  display: block;
  padding: 8px;
  border-radius: 7px;
  color: var(--cx-text) !important;
  text-decoration: none !important;
  font-size: 13px;
}

.cx-user-menu a:hover {
  background: var(--cx-panel-2);
}

.cx-sidebar {
  position: fixed;
  left: 0;
  top: var(--cx-top-h);
  bottom: 0;
  width: var(--cx-side-w);
  background: var(--cx-panel);
  border-right: 1px solid var(--cx-border);
  overflow-y: auto;
  z-index: 9050;
  padding: 10px 2px 14px;
  transition: transform 0.2s ease;
}

.cx-sidebar-head {
  color: var(--cx-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cx-sidebar-close {
  display: none;
  font-size: 12px;
}

.cx-section {
  margin-bottom: 12px;
}

.cx-section-title {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--cx-text);
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

.cx-section.active .cx-section-title {
  color: var(--cx-text);
}

.cx-section-title:hover {
  color: var(--cx-text);
}

.cx-group {
  margin-top: 7px;
}

.cx-group-title {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cx-muted);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
  position: relative;
}

.cx-group-title::after {
  content: '+';
  position: absolute;
  right: 10px;
}

.cx-group-title.open::after {
  content: '-';
}

.cx-group-title:hover {
  border-color: var(--cx-border);
}

.cx-items {
  margin-top: 3px;
  padding-left: 3px;
}

.cx-item {
  display: block;
  color: var(--cx-text) !important;
  text-decoration: none !important;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 10px;
}

.cx-item:hover {
  border-color: var(--cx-border);
  background: var(--cx-panel-2);
}

.cx-item.active {
  border-color: var(--cx-accent);
  background: var(--cx-accent-soft);
}

body[data-css="app"],
body {
  background: var(--cx-bg) !important;
}

/* Reduce black-heavy look in dark mode: shift base canvas to deep blue. */
body.cx-shell-ready.theme-dark,
html.cx-admin-pages body.cx-shell-ready.theme-dark {
  background: radial-gradient(1200px 600px at 20% -10%, #1a3658 0%, var(--cx-bg) 52%, #0f1e33 100%) !important;
}

/* AdminJS dark cards can render near-black by default; keep them in Concilux blue palette. */
body.cx-shell-ready.theme-dark .cx-panel-center .adminjs_Box {
  background: linear-gradient(180deg, #16263d 0%, #132338 100%) !important;
  border: 1px solid rgba(166, 197, 233, 0.16) !important;
}

/* Filter panel: blend field borders with control background (no hard outlines). */
body.cx-shell-ready.theme-dark .cx-panel-center .adminjs_Box:has(> .adminjs_Label):has(.adminjs_Input),
body.cx-shell-ready.theme-dark .cx-panel-center .adminjs_Box:has(> .adminjs_Label):has(.adminjs_Select) {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.cx-shell-ready.theme-dark .cx-panel-center .adminjs_Input,
body.cx-shell-ready.theme-dark .cx-panel-center .adminjs_Select [class$='-control'],
body.cx-shell-ready.theme-dark .cx-panel-center .adminjs_Select [class*='-control'] {
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
}

/* Unified geometry: form controls + bordered panels use 7px radius. */
:root {
  --cx-radius-std: 7px;
}

body.cx-shell-ready .cx-panel-center .adminjs_Box,
body.cx-shell-ready .cx-panel-center .cx-kpi,
body.cx-shell-ready .cx-panel-center .cx-modal-card,
body.cx-shell-ready .cx-panel-center .cx-mov-modal-card {
  border-radius: var(--cx-radius-std) !important;
}

body.cx-shell-ready .cx-panel-center input:not([type='checkbox']):not([type='radio']),
body.cx-shell-ready .cx-panel-center select,
body.cx-shell-ready .cx-panel-center textarea,
body.cx-shell-ready .cx-panel-center .adminjs_Input,
body.cx-shell-ready .cx-panel-center .adminjs_TextArea,
body.cx-shell-ready .cx-panel-center .adminjs_Select [class$='-control'],
body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='-control'],
body.cx-shell-ready .cx-panel-center .adminjs_Button {
  border-radius: var(--cx-radius-std) !important;
}

/* Global compact forms (slightly reduced controls). */
body.cx-shell-ready .cx-panel-center input:not([type='checkbox']):not([type='radio']):not([id^='react-select-']),
body.cx-shell-ready .cx-panel-center select,
body.cx-shell-ready .cx-panel-center textarea,
body.cx-shell-ready .cx-panel-center .adminjs_Input,
body.cx-shell-ready .cx-panel-center .adminjs_TextArea {
  font-size: 12px !important;
  padding: 5px 7px !important;
  min-height: 34px !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Select [class$='-control'],
body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='-control'] {
  min-height: 36px !important;
  height: 36px !important;
  font-size: 12px !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='ValueContainer'] {
  min-height: 34px !important;
  height: 34px !important;
  padding: 1px 6px !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='indicatorContainer'] {
  min-height: 34px !important;
  height: 34px !important;
  padding: 5px !important;
}

/* Keep react-select hidden text input neutral (avoid native input compact styles creating inner boxes). */
body.cx-shell-ready .cx-panel-center .adminjs_Select input[id^='react-select-'],
body.cx-shell-ready .cx-panel-center [class*='Select'] input[id^='react-select-'] {
  min-height: 0 !important;
  height: 1px !important;
  width: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.cx-shell-ready .cx-panel-center button,
body.cx-shell-ready .cx-panel-center .adminjs_Button {
  font-size: 12px !important;
  padding: 5px 8px !important;
  min-height: 34px !important;
}

/* Disabled controls must remain readable (override AdminJS low-contrast default). */
body.cx-shell-ready .cx-panel-center button:disabled,
body.cx-shell-ready .cx-panel-center .adminjs_Button:disabled,
body.cx-shell-ready .cx-panel-center .adminjs_Button[disabled],
body.cx-shell-ready .cx-panel-center [aria-disabled='true'].adminjs_Button {
  color: var(--cx-muted) !important;
  border-color: var(--cx-border) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  opacity: 1 !important;
}

/* Reusable secondary button pattern (turbo UI): clear text + transparent surface. */
body.cx-shell-ready.theme-dark .cx-panel-center .cx-btn-secondary {
  color: var(--cx-muted) !important;
  border-color: rgba(159, 176, 199, 0.42) !important;
  background: transparent !important;
}

body.cx-shell-ready.theme-dark .cx-panel-center .cx-btn-secondary:hover {
  color: #d3e2f4 !important;
  border-color: rgba(211, 226, 244, 0.58) !important;
  background: transparent !important;
}

body.cx-shell-ready.theme-dark .cx-panel-center .cx-btn-secondary:disabled,
body.cx-shell-ready.theme-dark .cx-panel-center .cx-btn-secondary[disabled],
body.cx-shell-ready.theme-dark .cx-panel-center .cx-btn-secondary[aria-disabled='true'] {
  color: var(--cx-muted) !important;
  border-color: var(--cx-border) !important;
  background: transparent !important;
  opacity: 1 !important;
}

body.cx-shell-ready .cx-panel-center {
  margin-left: 0 !important;
  margin-top: calc(var(--cx-top-h) + var(--cx-work-top-safe-h)) !important;
  min-height: calc(100vh - var(--cx-top-h) - var(--cx-work-top-safe-h)) !important;
  padding: 14px !important;
}

body.cx-shell-ready.cx-with-sidebar .cx-panel-center {
  margin-left: var(--cx-side-w) !important;
}

body.cx-shell-ready:not(.cx-with-sidebar) .cx-sidebar {
  transform: translateX(-102%);
  pointer-events: none;
}

body.cx-shell-ready.cx-sidebar-collapsed .cx-sidebar {
  transform: translateX(-102%);
}

body.cx-shell-ready.cx-sidebar-collapsed .cx-panel-center {
  margin-left: 0 !important;
}

body.cx-shell-ready .cx-panel-center > section,
body.cx-shell-ready .cx-panel-center > div > section,
body.cx-shell-ready main > section,
body.cx-shell-ready main > div > section {
  max-width: 1450px;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 979px) {
  .cx-panel-top {
    flex-wrap: nowrap;
    height: var(--cx-top-h);
    min-height: var(--cx-top-h);
    padding-top: 0;
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .cx-top-left {
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .cx-top-right {
    min-width: max-content;
  }

  .cx-sidebar {
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    width: min(88vw, 340px);
    box-shadow: 14px 0 28px rgba(0, 0, 0, 0.22);
  }

  body.cx-shell-ready.cx-with-sidebar .cx-workspace-top.open {
    left: 0;
    right: 0;
  }

  .cx-sidebar-close {
    display: inline-flex;
  }

  body.cx-sidebar-open .cx-sidebar {
    transform: translateX(0);
  }

  body.cx-shell-ready .cx-panel-center {
    margin-left: 0 !important;
    padding: 10px !important;
  }
}

/* Reusable Concilux page primitives (functional + compact). */
.cx-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cx-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cx-page-title {
  margin: 0 !important;
}

.cx-filters-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.cx-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.cx-kpi {
  border: 1px solid var(--cx-border);
  border-radius: 10px;
  padding: 10px;
  background: var(--cx-panel-2);
  min-height: 74px;
}

.cx-kpi-label {
  display: block;
  color: var(--cx-muted);
  font-size: 12px;
}

.cx-kpi-value {
  display: block;
  color: var(--cx-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.cx-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cx-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.cx-table-wrap table {
  min-width: 760px;
}

/* TGR page: explicit text contrast in both themes. */
.cx-tgr-page .cx-page-title,
.cx-tgr-page .adminjs_H2,
.cx-tgr-page .adminjs_Header.adminjs_H2,
.cx-tgr-page table th,
.cx-tgr-page table td {
  color: var(--cx-text) !important;
}

/* F29 page: force readable text in both themes (especially light mode). */
.cx-f29-page .cx-page-title,
.cx-f29-page .adminjs_H2,
.cx-f29-page .adminjs_Header.adminjs_H2 {
  color: var(--cx-text) !important;
}

.cx-f29-page table th,
.cx-f29-page table td {
  color: var(--cx-text) !important;
}

.cx-f29-page .cx-f29-filters-top,
.cx-f29-page .cx-f29-filters-bottom {
  display: grid;
  gap: 12px;
}

.cx-f29-page .cx-f29-filters-top {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.cx-f29-page .cx-f29-filters-bottom {
  margin-top: 10px;
  grid-template-columns: minmax(260px, 1.3fr) minmax(180px, 0.8fr) minmax(320px, 1fr);
  align-items: end;
}

.cx-f29-page .cx-f29-actions {
  justify-content: flex-start;
  margin-bottom: 2px;
}

.cx-f29-page .cx-f29-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.cx-f29-page .cx-f29-conc-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 2fr 0.8fr 1.4fr auto;
  align-items: end;
}

@media (max-width: 1360px) {
  .cx-f29-page .cx-f29-filters-top {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
  .cx-f29-page .cx-f29-filters-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .cx-f29-page .cx-f29-actions {
    grid-column: 1 / -1;
  }
  .cx-f29-page .cx-f29-summary {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
  .cx-f29-page .cx-f29-conc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .cx-filters-grid,
  .cx-kpi-grid {
    grid-template-columns: 1fr;
  }

  .cx-entregables-hero {
    grid-template-columns: 1fr;
  }

  .cx-entregables-actions {
    justify-content: flex-start;
  }

  .cx-entregables-metrics {
    grid-template-columns: 1fr;
  }

  .cx-pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .cx-table-wrap table {
    min-width: 640px;
    display: table !important;
    width: max-content !important;
  }

  .cx-f29-page .cx-f29-filters-top,
  .cx-f29-page .cx-f29-filters-bottom,
  .cx-f29-page .cx-f29-summary,
  .cx-f29-page .cx-f29-conc-grid {
    grid-template-columns: 1fr;
  }
  .cx-f29-page .cx-f29-actions {
    margin-top: 2px;
  }

  .cx-entregables-table {
    min-width: 920px;
    display: table !important;
    width: max-content !important;
  }
}

.cx-page-subtitle {
  color: var(--cx-muted);
  font-size: 12px;
}

.cx-page-meta {
  color: var(--cx-muted);
  font-size: 12px;
  white-space: nowrap;
}

.cx-entregables-page {
  gap: 14px;
}

.cx-entregables-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.cx-entregables-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cx-entregables-kicker {
  color: #8cc0ff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.cx-entregables-title {
  margin: 0 !important;
}

.cx-entregables-copy {
  color: var(--cx-muted);
  max-width: 78ch;
}

.cx-entregables-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cx-entregables-grid {
  align-items: stretch;
}

.cx-entregables-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cx-entregables-source-pill {
  min-width: 180px;
  border-radius: 10px;
  border: 1px solid var(--cx-border);
  background: var(--cx-panel-2);
  padding: 8px 10px;
}

.cx-entregables-source-label {
  display: block;
  color: var(--cx-text);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}

.cx-entregables-source-count {
  color: var(--cx-muted);
  font-size: 12px;
}

.cx-entregables-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.cx-entregables-metric {
  color: var(--cx-text);
  font-size: 12px;
}

.cx-entregables-table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cx-entregables-table {
  width: 100%;
}

.cx-entregables-row-num {
  font-weight: 700;
  color: var(--cx-text);
}

.cx-entregables-row-title {
  color: var(--cx-text);
  font-weight: 700;
}

.cx-entregables-row-subtitle,
.cx-entregables-row-source,
.cx-entregables-row-note {
  color: var(--cx-muted);
  font-size: 12px;
  line-height: 1.4;
}

.cx-entregables-row-source {
  max-width: 32ch;
}

.cx-entregables-importaciones {
  margin-top: 6px;
}

.cx-entregables-importaciones-list {
  margin: 6px 0 0 18px;
  padding: 0;
  color: var(--cx-muted);
  font-size: 12px;
  line-height: 1.45;
}

.cx-entregables-importaciones-item {
  margin-bottom: 4px;
}

.cx-entregables-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 5px;
  border: 1px solid transparent;
}

.cx-entregables-status--covered {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.cx-entregables-status--partial {
  color: #fcd34d;
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.1);
}

.cx-entregables-status--manual {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.1);
}

.cx-entregables-status--na {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.1);
}

.cx-card {
  border: 1px solid var(--cx-border);
  border-radius: 10px;
  padding: 12px;
  background: var(--cx-panel);
}

.cx-card-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.cx-card-locked {
  position: relative;
}

.cx-card-lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.35);
  z-index: 2;
  cursor: not-allowed;
}

.cx-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cx-toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cx-grid-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.cx-grid-filters {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cx-scroll-230 {
  max-height: 230px;
  overflow: auto;
}

.cx-scroll-250 {
  max-height: 250px;
  overflow: auto;
}

.cx-scroll-260 {
  max-height: 260px;
  overflow: auto;
}

.cx-log-pre {
  margin: 0;
  max-height: 330px;
  overflow: auto;
  background: var(--cx-panel-2);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--cx-border);
  color: var(--cx-text);
  font-size: 12px;
}

.cx-month-input {
  background: var(--cx-panel-2);
  color: var(--cx-text);
  border: 1px solid var(--cx-border);
  border-radius: 8px;
  padding: 7px 10px;
}

.cx-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.cx-pill-running {
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
}

.cx-pill-idle {
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
}

.cx-alert-danger {
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 10px;
  padding: 12px;
  background: rgba(127, 29, 29, 0.22);
}

.cx-alert-danger-title {
  color: #fecaca;
  font-weight: 700;
}

.cx-alert-danger-text {
  color: #fecaca;
}

.cx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2147483000;
  padding: 20px;
  overflow: auto;
}

.cx-modal-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-border);
  border-radius: 10px;
  color: var(--cx-text);
}

.cx-modal-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 10px;
  column-gap: 12px;
}

.cx-mov-modal-card {
  background: var(--cx-panel, #111d2f) !important;
  color: var(--cx-text, #dbe5f3) !important;
  border: 1px solid var(--cx-border, rgba(255, 255, 255, 0.14)) !important;
  border-radius: 10px !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
}

html.cx-theme-light .cx-mov-modal-card,
html[data-theme='light'] .cx-mov-modal-card,
body.cx-theme-light .cx-mov-modal-card,
body.theme-light .cx-mov-modal-card,
body[data-theme='light'] .cx-mov-modal-card {
  background: var(--cx-panel, #ffffff) !important;
  color: var(--cx-text, #10233d) !important;
}

.cx-muted-label {
  color: var(--cx-muted);
  margin-bottom: 4px;
  display: block;
}

.cx-link-button {
  border: 0;
  background: transparent;
  color: rgb(37, 107, 238);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

/* ============================================================
   Concilux sober operations visual layer
   Dense accounting UI: quiet surfaces, low-noise borders, clear data.
   ============================================================ */

:root {
  --cx-top-h: 58px;
  --cx-side-w: 282px;
  --cx-radius-std: 6px;

  --cx-ink-strong: #f2f7fc;
  --cx-ink: #e1ebf5;
  --cx-ink-soft: #b5c4d6;
  --cx-ink-mute: #899aaf;

  --cx-bg: #121d2c;
  --cx-panel: #1b2a3f;
  --cx-panel-2: #23364f;
  --cx-panel-3: #2d425d;
  --cx-control: #1a2a40;
  --cx-control-hover: #263b55;
  --cx-button: #314f71;
  --cx-button-hover: #3c638c;
  --cx-button-border: rgba(185, 218, 250, 0.42);
  --cx-border: rgba(184, 204, 228, 0.18);
  --cx-border-soft: rgba(184, 204, 228, 0.10);
  --cx-border-strong: rgba(184, 204, 228, 0.30);
  --cx-text: var(--cx-ink);
  --cx-muted: var(--cx-ink-soft);
  --cx-accent: #3ea3f7;
  --cx-accent-soft: rgba(74, 165, 244, 0.14);
  --cx-accent-line: rgba(62, 163, 247, 0.52);
  --cx-success: #36c08a;
  --cx-warning: #d7a83b;
  --cx-danger: #ea6d73;
}

html.cx-theme-light,
html[data-theme='light'],
body.cx-theme-light,
body.theme-light,
body[data-theme='light'] {
  --cx-ink-strong: #102033;
  --cx-ink: #24344a;
  --cx-ink-soft: #5b6e84;
  --cx-ink-mute: #7b8a9c;

  --cx-bg: #dce5ef;
  --cx-panel: #e9eff6;
  --cx-panel-2: #dde7f1;
  --cx-panel-3: #cbd9e7;
  --cx-control: #d7e3ee;
  --cx-control-hover: #cbdbea;
  --cx-button: #c8dbec;
  --cx-button-hover: #b6d0e8;
  --cx-button-border: rgba(20, 84, 150, 0.50);
  --cx-border: rgba(32, 48, 71, 0.18);
  --cx-border-soft: rgba(32, 48, 71, 0.10);
  --cx-border-strong: rgba(32, 48, 71, 0.28);
  --cx-text: var(--cx-ink);
  --cx-muted: var(--cx-ink-soft);
  --cx-accent: #1467c4;
  --cx-accent-soft: rgba(20, 103, 196, 0.10);
  --cx-accent-line: rgba(20, 103, 196, 0.46);
  --cx-success: #14865d;
  --cx-warning: #9a6a12;
  --cx-danger: #b93542;
}

body.cx-shell-ready,
html.cx-admin-pages body.cx-shell-ready,
body.cx-login-page {
  background: var(--cx-bg) !important;
  color: var(--cx-text) !important;
  font-family: "Segoe UI", Arial, sans-serif;
}

body.cx-shell-ready.theme-dark,
html.cx-admin-pages body.cx-shell-ready.theme-dark {
  background: var(--cx-bg) !important;
}

#concilux-shell {
  font-family: "Segoe UI", Arial, sans-serif;
}

#concilux-shell *,
.cx-panel-top,
.cx-workspace-top,
.cx-sidebar {
  box-sizing: border-box;
}

.cx-panel-top {
  background: color-mix(in srgb, var(--cx-panel) 94%, transparent) !important;
  border-bottom: 1px solid var(--cx-border) !important;
  padding: 0 12px !important;
  gap: 10px !important;
  backdrop-filter: blur(14px);
}

.cx-top-left,
.cx-top-right {
  gap: 6px !important;
}

.cx-brand {
  margin-right: 10px !important;
  min-width: 126px;
}

.cx-brand img {
  width: 122px !important;
  max-height: 36px !important;
  object-fit: contain;
}

.cx-top-link {
  min-height: 34px;
  border-radius: 6px !important;
  color: var(--cx-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  padding: 7px 9px !important;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.cx-top-link:hover {
  color: var(--cx-text) !important;
  background: var(--cx-control-hover) !important;
  border-color: var(--cx-border) !important;
}

.cx-top-link.active {
  color: var(--cx-ink-strong) !important;
  background: var(--cx-accent-soft) !important;
  border-color: var(--cx-accent-line) !important;
}

.cx-icon-btn,
.cx-user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 6px !important;
  border-color: var(--cx-border) !important;
  background: var(--cx-control) !important;
  color: var(--cx-text) !important;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.cx-icon-btn:hover,
.cx-user-btn:hover .cx-user-avatar {
  background: var(--cx-control-hover) !important;
  border-color: var(--cx-accent-line) !important;
}

.cx-user-btn {
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 7px !important;
  background: var(--cx-control) !important;
  color: var(--cx-text) !important;
  padding: 0 8px 0 1px !important;
}

.cx-user-btn:hover {
  background: var(--cx-control-hover) !important;
  border-color: var(--cx-accent-line) !important;
}

.cx-user-name {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cx-muted);
  font-size: 12px;
  font-weight: 650;
}

.cx-user-menu {
  background: var(--cx-panel) !important;
  border-color: var(--cx-border) !important;
  border-radius: 7px !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24) !important;
}

.cx-user-title {
  color: var(--cx-muted) !important;
  border-bottom-color: var(--cx-border-soft) !important;
}

.cx-user-menu a:hover {
  background: var(--cx-control-hover) !important;
}

.cx-sidebar {
  background: var(--cx-bg) !important;
  border-right: 1px solid var(--cx-border) !important;
  padding: 12px 8px 18px !important;
}

.cx-sidebar-head {
  margin: 0 4px 10px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--cx-border-soft);
  color: var(--cx-muted) !important;
  letter-spacing: 0.06em !important;
}

.cx-group {
  margin-top: 8px !important;
}

.cx-group-title {
  border-radius: 5px !important;
  color: var(--cx-ink-mute) !important;
  font-size: 11px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 10px !important;
}

.cx-group-title:hover,
.cx-group-title.open {
  color: var(--cx-muted) !important;
  background: transparent !important;
  border-color: var(--cx-border-soft) !important;
}

.cx-item {
  position: relative;
  border-radius: 5px !important;
  color: var(--cx-muted) !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  padding: 7px 10px 7px 12px !important;
}

.cx-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.cx-item:hover {
  color: var(--cx-text) !important;
  border-color: var(--cx-border-soft) !important;
  background: var(--cx-panel-2) !important;
}

.cx-item.active {
  color: var(--cx-ink-strong) !important;
  border-color: var(--cx-border) !important;
  background: var(--cx-accent-soft) !important;
}

.cx-item.active::before {
  background: var(--cx-accent);
}

.cx-workspace-top {
  background: var(--cx-panel) !important;
  border-bottom-color: var(--cx-border) !important;
}

.cx-workspace-top-title {
  color: var(--cx-ink-strong) !important;
}

.cx-year-control,
.cx-workspace-top-year .cx-year-control,
.cx-workspace-top-year .cx-year-menu {
  background: var(--cx-control) !important;
  border-color: var(--cx-border) !important;
  border-radius: 6px !important;
  color: var(--cx-text) !important;
}

.cx-workspace-top-year .cx-year-option:hover,
.cx-workspace-top-year .cx-year-option.is-selected {
  background: var(--cx-accent-soft) !important;
}

body.cx-shell-ready .cx-panel-center {
  padding: 12px !important;
  background: var(--cx-bg) !important;
}

body.cx-shell-ready .cx-panel-center > section,
body.cx-shell-ready .cx-panel-center > div > section,
body.cx-shell-ready main > section,
body.cx-shell-ready main > div > section {
  max-width: 1500px !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Box,
body.cx-shell-ready .cx-panel-center .cx-card,
body.cx-shell-ready .cx-panel-center .cx-kpi,
body.cx-shell-ready .cx-panel-center .bi-panel,
body.cx-shell-ready .cx-panel-center main > section,
body.cx-shell-ready .cx-panel-center main > div > section {
  background: var(--cx-panel) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: var(--cx-text) !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Box .adminjs_Box,
body.cx-shell-ready .cx-panel-center .cx-card .cx-card,
body.cx-shell-ready .cx-panel-center .cx-kpi {
  background: var(--cx-panel-2) !important;
}

body.cx-shell-ready .cx-panel-center h1,
body.cx-shell-ready .cx-panel-center h2,
body.cx-shell-ready .cx-panel-center h3,
body.cx-shell-ready .cx-panel-center h4,
body.cx-shell-ready .cx-panel-center .adminjs_H1,
body.cx-shell-ready .cx-panel-center .adminjs_H2,
body.cx-shell-ready .cx-panel-center .adminjs_H3,
body.cx-shell-ready .cx-panel-center .adminjs_H4 {
  color: var(--cx-ink-strong) !important;
  letter-spacing: 0 !important;
}

body.cx-shell-ready .cx-panel-center label,
body.cx-shell-ready .cx-panel-center .adminjs_Label,
body.cx-shell-ready .cx-page-subtitle,
body.cx-shell-ready .cx-page-meta,
body.cx-shell-ready .cx-muted-label,
body.cx-shell-ready .cx-kpi-label {
  color: var(--cx-muted) !important;
}

body.cx-shell-ready .cx-panel-center input:not([type='checkbox']):not([type='radio']):not([id^='react-select-']),
body.cx-shell-ready .cx-panel-center select,
body.cx-shell-ready .cx-panel-center textarea,
body.cx-shell-ready .cx-panel-center .adminjs_Input,
body.cx-shell-ready .cx-panel-center .adminjs_TextArea,
body.cx-shell-ready .cx-panel-center .adminjs_Select [class$='-control'],
body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='-control'] {
  background: var(--cx-control) !important;
  border: 1px solid var(--cx-border) !important;
  color: var(--cx-text) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

body.cx-shell-ready .cx-panel-center input:focus,
body.cx-shell-ready .cx-panel-center select:focus,
body.cx-shell-ready .cx-panel-center textarea:focus,
body.cx-shell-ready .cx-panel-center .adminjs_Input:focus,
body.cx-shell-ready .cx-panel-center .adminjs_TextArea:focus,
body.cx-shell-ready .cx-panel-center .adminjs_Select [class$='-control']:focus-within,
body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='-control']:focus-within {
  border-color: var(--cx-accent-line) !important;
  box-shadow: 0 0 0 3px var(--cx-accent-soft) !important;
}

body.cx-shell-ready .cx-panel-center input::placeholder,
body.cx-shell-ready .cx-panel-center textarea::placeholder {
  color: var(--cx-ink-mute) !important;
}

body.cx-shell-ready .cx-panel-center button,
body.cx-shell-ready .cx-panel-center .adminjs_Button,
body.cx-shell-ready .cx-panel-center a[role='button'] {
  border-radius: 6px !important;
  border: 1px solid var(--cx-button-border) !important;
  background: var(--cx-button) !important;
  color: var(--cx-text) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

body.cx-shell-ready .cx-panel-center button:hover,
body.cx-shell-ready .cx-panel-center .adminjs_Button:hover,
body.cx-shell-ready .cx-panel-center a[role='button']:hover {
  background: var(--cx-button-hover) !important;
  border-color: var(--cx-accent-line) !important;
}

body.cx-shell-ready .cx-panel-center button[class*='primary' i],
body.cx-shell-ready .cx-panel-center button[data-variant='primary' i],
body.cx-shell-ready .cx-panel-center .adminjs_Button[class*='primary' i] {
  background: var(--cx-accent) !important;
  border-color: var(--cx-accent) !important;
  color: #ffffff !important;
}

body.cx-shell-ready .cx-panel-center button:disabled,
body.cx-shell-ready .cx-panel-center .adminjs_Button:disabled,
body.cx-shell-ready .cx-panel-center .adminjs_Button[disabled] {
  background: var(--cx-panel-2) !important;
  border-color: var(--cx-border-soft) !important;
  color: var(--cx-ink-mute) !important;
}

body.cx-shell-ready .cx-panel-center table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: var(--cx-panel) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 6px !important;
  overflow: hidden;
}

body.cx-shell-ready .cx-panel-center table th,
body.cx-shell-ready .cx-panel-center table td {
  border-bottom: 1px solid var(--cx-border-soft) !important;
  color: var(--cx-text) !important;
}

body.cx-shell-ready .cx-panel-center table th,
body.cx-shell-ready .cx-panel-center thead th {
  position: sticky;
  top: calc(var(--cx-top-h) + var(--cx-work-top-safe-h));
  z-index: 5;
  background: var(--cx-panel-3) !important;
  color: var(--cx-muted) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
}

body.cx-shell-ready .cx-panel-center tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--cx-panel-2) 44%, transparent) !important;
}

body.cx-shell-ready .cx-panel-center tbody tr:hover td {
  background: var(--cx-accent-soft) !important;
}

body.cx-shell-ready .cx-panel-center table td {
  font-variant-numeric: tabular-nums;
}

body.cx-shell-ready .cx-panel-center table td:nth-child(n+4),
body.cx-shell-ready .cx-panel-center .cx-kpi-value {
  font-variant-numeric: tabular-nums;
}

.cx-pill,
span[class*='badge' i],
span[class*='pill' i] {
  border-radius: 999px !important;
  border: 1px solid var(--cx-border-soft) !important;
  background: var(--cx-panel-2) !important;
  color: var(--cx-text) !important;
}

body.cx-login-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cx-panel-2) 36%, transparent), transparent 42%),
    var(--cx-bg) !important;
}

body.cx-login-page .login__Wrapper,
body.cx-login-page section[class*='login__Wrapper'] {
  background: transparent !important;
}

body.cx-login-page .cx-login-card {
  width: min(430px, calc(100vw - 32px)) !important;
  display: block !important;
  background: var(--cx-panel) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

body.cx-login-page .cx-login-card::before {
  content: 'Concilux';
  display: block;
  padding: 22px 24px 0;
  color: var(--cx-ink-strong);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0;
}

body.cx-login-page .cx-login-card::after {
  content: 'Administracion financiera';
  display: block;
  margin: -2px 24px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cx-border-soft);
  color: var(--cx-muted);
  font-size: 12px;
  font-weight: 600;
}

body.cx-login-page .cx-login-right {
  background: transparent !important;
}

body.cx-login-page .cx-login-form {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding: 18px 24px 24px !important;
}

body.cx-login-page form[action='/admin/login'] input,
body.cx-login-page .cx-login-form input {
  min-height: 38px !important;
  background: var(--cx-control) !important;
  border-color: var(--cx-border) !important;
  border-radius: 6px !important;
}

body.cx-login-page form[action='/admin/login'] button[type='submit'],
body.cx-login-page .cx-login-form button[type='submit'] {
  min-height: 38px !important;
  border-radius: 6px !important;
  background: var(--cx-accent) !important;
  border-color: var(--cx-accent) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

#cx-login-theme-toggle {
  right: 18px !important;
  bottom: 18px !important;
  border-radius: 8px !important;
  background: var(--cx-panel) !important;
  border-color: var(--cx-border) !important;
  box-shadow: none !important;
}

@media (max-width: 979px) {
  .cx-panel-top {
    padding: 0 8px !important;
  }

  .cx-brand {
    min-width: auto;
    margin-right: 4px !important;
  }

  .cx-brand img {
    width: 104px !important;
  }

  .cx-top-link {
    padding: 7px 8px !important;
  }

  .cx-user-name {
    display: none;
  }

  .cx-sidebar {
    width: min(88vw, 332px) !important;
  }

  body.cx-shell-ready.cx-with-sidebar .cx-panel-center,
  body.cx-shell-ready.cx-sidebar-collapsed .cx-panel-center,
  body.cx-shell-ready .cx-panel-center {
    margin-left: 0 !important;
    width: auto !important;
  }
}

/* Functional-section framing:
   JS marks real page blocks (filters, tables, panels). Inner AdminJS sections stay structural. */
body.cx-shell-ready .cx-panel-center section.adminjs_Box {
  border-width: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

body.cx-shell-ready.theme-dark .cx-panel-center section.adminjs_Box:not(.cx-functional-section),
body.cx-shell-ready.theme-light .cx-panel-center section.adminjs_Box:not(.cx-functional-section),
body.cx-shell-ready.cx-theme-light .cx-panel-center section.adminjs_Box:not(.cx-functional-section) {
  border: 0 !important;
  border-width: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-section {
  border: 1px solid var(--cx-border) !important;
  border-width: 1px !important;
  border-color: var(--cx-border) !important;
  background: var(--cx-panel) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  color: var(--cx-text) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-section {
  margin-top: 12px !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-section:first-of-type {
  margin-top: 0 !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: end !important;
  gap: 12px 14px !important;
  padding: 14px 14px 32px !important;
  background: color-mix(in srgb, var(--cx-panel) 86%, var(--cx-panel-2)) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters > section.adminjs_Box {
  margin: 0 !important;
  width: auto !important;
  min-width: 0 !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters > * {
  min-width: 0 !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .cx-filter-wide {
  grid-column: span 2;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .cx-filter-action {
  align-self: end !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .cx-filter-total {
  position: absolute !important;
  right: 14px;
  bottom: 10px;
  align-self: center !important;
  color: var(--cx-muted) !important;
  font-size: 12px !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters input:not([type='checkbox']):not([type='radio']),
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters select,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters textarea,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Input,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Select,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Select [class$='-control'],
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Select [class*='-control'] {
  width: 100% !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters input:not([type='checkbox']):not([type='radio']),
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters select,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters textarea,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Input,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_TextArea {
  background: var(--cx-control) !important;
  border-color: var(--cx-border) !important;
  color: var(--cx-text) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters label,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Label {
  color: var(--cx-muted) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  margin-bottom: 5px !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-pager {
  min-height: 34px;
  padding: 5px 8px !important;
  background: color-mix(in srgb, var(--cx-panel) 92%, var(--cx-panel-2)) !important;
  border-color: var(--cx-border-soft) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-pager button,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-pager .adminjs_Button {
  min-height: 28px !important;
  padding: 4px 8px !important;
  background: var(--cx-button) !important;
  border-color: var(--cx-button-border) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table {
  overflow: hidden !important;
  padding: 0 !important;
  background: var(--cx-panel) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table table {
  border: 0 !important;
  border-radius: 0 !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters button,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-filters .adminjs_Button {
  min-height: 36px !important;
  font-weight: 700 !important;
  background: var(--cx-button) !important;
  border-color: var(--cx-button-border) !important;
  color: var(--cx-ink-strong) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table button,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table .adminjs_Button,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table a[role='button'] {
  background: var(--cx-button) !important;
  border-color: var(--cx-button-border) !important;
  color: var(--cx-ink-strong) !important;
  font-weight: 700 !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table button:hover,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table .adminjs_Button:hover,
body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-table a[role='button']:hover {
  background: var(--cx-button-hover) !important;
  border-color: var(--cx-accent-line) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-summary {
  padding: 10px 12px !important;
}

body.cx-shell-ready .cx-panel-center table {
  border-color: var(--cx-border-soft) !important;
}

body.cx-shell-ready .cx-panel-center table th,
body.cx-shell-ready .cx-panel-center thead th {
  background: color-mix(in srgb, var(--cx-panel-3) 82%, #000000) !important;
  color: var(--cx-ink-soft) !important;
}

body.cx-shell-ready .cx-panel-center table th,
body.cx-shell-ready .cx-panel-center table td {
  border-bottom-color: var(--cx-border-soft) !important;
}

body.cx-shell-ready .cx-panel-center table td {
  color: var(--cx-text) !important;
  font-weight: 500 !important;
}

body.cx-shell-ready .cx-panel-center table th:nth-child(1),
body.cx-shell-ready .cx-panel-center table td:nth-child(1) {
  min-width: 54px !important;
  white-space: nowrap !important;
}

body.cx-shell-ready .cx-panel-center table th:nth-child(2),
body.cx-shell-ready .cx-panel-center table td:nth-child(2) {
  min-width: 86px !important;
  white-space: nowrap !important;
}

body.cx-shell-ready .cx-panel-center tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--cx-panel-2) 16%, transparent) !important;
}

body.cx-shell-ready .cx-panel-center tbody tr:hover td {
  background: color-mix(in srgb, var(--cx-accent-soft) 70%, transparent) !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='multiValue'],
body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='MultiValue'] {
  background: var(--cx-panel-3) !important;
  border: 1px solid var(--cx-border-soft) !important;
  color: var(--cx-text) !important;
  border-radius: 4px !important;
}

body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='multiValue'] *,
body.cx-shell-ready .cx-panel-center .adminjs_Select [class*='MultiValue'] * {
  color: var(--cx-text) !important;
}

body.cx-shell-ready .cx-panel-center section.adminjs_Box.cx-functional-section section.adminjs_Box:not(.cx-functional-section) {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* Rendiciones de gastos: dense treasury workspace */
body.cx-shell-ready .cx-panel-center .cx-rendiciones-page {
  color: var(--cx-text) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-card {
  background: var(--cx-panel) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-hero {
  background: color-mix(in srgb, var(--cx-panel) 84%, var(--cx-panel-2)) !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-toolbar {
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 12px !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-field {
  flex: 0 0 158px !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-search-action {
  flex: 0 0 auto !important;
  margin-right: 8px !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-primary-action {
  margin-left: auto !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-toolbar > .adminjs_Box:not(.cx-rg-field):not(.cx-rg-search-action):not(.cx-rg-primary-action) {
  flex: 0 0 auto !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-section-head {
  margin-bottom: 8px !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-section-head h4,
body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-section-head .adminjs_H4 {
  margin: 0 !important;
  line-height: 1.25 !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-section-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-subsection + .cx-rg-subsection {
  margin-top: 20px !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--cx-border-soft) !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-table-wrap {
  overflow-x: auto !important;
  border: 1px solid var(--cx-border-soft) !important;
  border-radius: 6px !important;
  background: color-mix(in srgb, var(--cx-panel-2) 42%, transparent) !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-table-wrap table {
  min-width: 880px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-table-wrap table tr:last-child td {
  border-bottom-color: transparent !important;
}

body.cx-shell-ready .cx-panel-center .cx-rendiciones-page button[disabled],
body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .adminjs_Button[disabled] {
  opacity: 0.58 !important;
}

@media (max-width: 900px) {
  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-toolbar {
    align-items: stretch !important;
  }

  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-field,
  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-search-action,
  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-primary-action {
    flex: 1 1 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-toolbar button,
  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-section-actions button {
    width: 100% !important;
  }

  body.cx-shell-ready .cx-panel-center .cx-rendiciones-page .cx-rg-section-actions {
    width: 100% !important;
    justify-content: stretch !important;
  }
}

/* Boletas compra: mobile-first manual receipt form */
body.cx-shell-ready .cx-panel-center .cx-boletas-page {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.cx-shell-ready .cx-panel-center .cx-boletas-page .cx-bc-page-head {
  flex-wrap: wrap !important;
  padding: 10px 12px !important;
  background: var(--cx-panel) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 6px !important;
}

body.cx-shell-ready .cx-bc-modal-overlay {
  background: rgba(7, 12, 20, 0.72) !important;
  backdrop-filter: blur(2px);
}

body.cx-shell-ready .cx-bc-modal-panel {
  border: 1px solid var(--cx-border) !important;
  border-radius: 8px !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38) !important;
  background: var(--cx-panel) !important;
}

body.cx-shell-ready .cx-bc-modal-shell {
  padding: 0 !important;
  background: var(--cx-panel) !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--cx-text) !important;
}

body.cx-shell-ready .cx-bc-modal-head {
  position: sticky !important;
  top: 0;
  z-index: 2;
  min-height: 56px;
  padding: 12px 14px !important;
  background: color-mix(in srgb, var(--cx-panel) 88%, var(--cx-panel-2)) !important;
  border-bottom: 1px solid var(--cx-border-soft) !important;
}

body.cx-shell-ready .cx-bc-modal-head .adminjs_Text,
body.cx-shell-ready .cx-bc-modal-head p {
  color: var(--cx-ink-strong) !important;
  font-size: 18px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}

body.cx-shell-ready .cx-bc-modal-head button {
  background: var(--cx-button) !important;
  border-color: var(--cx-button-border) !important;
  color: var(--cx-ink-strong) !important;
  font-weight: 700 !important;
}

body.cx-shell-ready .cx-bc-modal-head button:hover {
  background: var(--cx-button-hover) !important;
  border-color: var(--cx-accent-line) !important;
}

body.cx-shell-ready .cx-bc-modal-body {
  margin-top: 0 !important;
  padding: 14px !important;
}

body.cx-shell-ready .cx-bc-create-form {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px !important;
  align-items: start !important;
}

body.cx-shell-ready .cx-bc-create-form .cx-bc-field {
  width: auto !important;
  min-width: 0 !important;
}

body.cx-shell-ready .cx-bc-create-form .cx-bc-field-date,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-folio,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-amount,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-currency,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-rut {
  grid-column: span 2;
}

body.cx-shell-ready .cx-bc-create-form .cx-bc-field-provider,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-category,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-cost {
  grid-column: span 3;
}

body.cx-shell-ready .cx-bc-create-form .cx-bc-field-description {
  grid-column: span 7;
}

body.cx-shell-ready .cx-bc-create-form .cx-bc-field-file,
body.cx-shell-ready .cx-bc-create-form .cx-bc-field-comments {
  grid-column: span 4;
}

body.cx-shell-ready .cx-bc-create-form .cx-bc-create-actions {
  grid-column: 1 / -1;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding-top: 6px !important;
}

body.cx-shell-ready .cx-bc-create-form label,
body.cx-shell-ready .cx-bc-create-form .adminjs_Label {
  display: block !important;
  margin-bottom: 6px !important;
  color: var(--cx-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.cx-shell-ready .cx-bc-create-form input:not([type='checkbox']):not([type='radio']),
body.cx-shell-ready .cx-bc-create-form textarea,
body.cx-shell-ready .cx-bc-create-form .adminjs_Input,
body.cx-shell-ready .cx-bc-create-form .adminjs_Select [class$='-control'],
body.cx-shell-ready .cx-bc-create-form .adminjs_Select [class*='-control'] {
  width: 100% !important;
  min-height: 40px !important;
  background: var(--cx-control) !important;
  border: 1px solid var(--cx-border) !important;
  border-radius: 7px !important;
  color: var(--cx-text) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

body.cx-shell-ready .cx-bc-create-form textarea {
  min-height: 98px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

body.cx-shell-ready .cx-bc-create-form input[type='file'] {
  min-height: 42px !important;
  padding: 6px !important;
  overflow: hidden !important;
  font-size: 12px !important;
  color: transparent !important;
}

body.cx-shell-ready .cx-bc-create-form input[type='file']::file-selector-button {
  min-height: 28px;
  margin-right: 8px;
  border: 1px solid var(--cx-button-border);
  border-radius: 6px;
  background: var(--cx-button);
  color: var(--cx-ink-strong);
  font-weight: 700;
}

body.cx-shell-ready .cx-bc-create-form input:focus,
body.cx-shell-ready .cx-bc-create-form textarea:focus,
body.cx-shell-ready .cx-bc-create-form .adminjs_Select [class$='-control']:focus-within,
body.cx-shell-ready .cx-bc-create-form .adminjs_Select [class*='-control']:focus-within {
  border-color: var(--cx-accent-line) !important;
  box-shadow: 0 0 0 3px var(--cx-accent-soft) !important;
}

@media (max-width: 900px) {
  body.cx-shell-ready .cx-bc-modal-overlay {
    align-items: flex-start !important;
    padding: 6px !important;
  }

  body.cx-shell-ready .cx-bc-modal-panel {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 8px !important;
    overflow-x: hidden !important;
  }

  body.cx-shell-ready .cx-bc-modal-head {
    padding: 10px 10px 10px 12px !important;
  }

  body.cx-shell-ready .cx-bc-modal-head .adminjs_Text,
  body.cx-shell-ready .cx-bc-modal-head p {
    max-width: calc(100vw - 118px);
    font-size: 15px !important;
    white-space: normal !important;
  }

  body.cx-shell-ready .cx-bc-modal-head button {
    flex: 0 0 auto !important;
  }

  body.cx-shell-ready .cx-bc-modal-body {
    padding: 12px !important;
  }

  body.cx-shell-ready .cx-bc-create-form {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding-bottom: 0 !important;
  }

  body.cx-shell-ready .cx-bc-create-form .cx-bc-field,
  body.cx-shell-ready .cx-bc-create-form .cx-bc-create-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.cx-shell-ready .cx-bc-create-form input:not([type='checkbox']):not([type='radio']),
  body.cx-shell-ready .cx-bc-create-form textarea,
  body.cx-shell-ready .cx-bc-create-form .adminjs_Input,
  body.cx-shell-ready .cx-bc-create-form .adminjs_Select [class$='-control'],
  body.cx-shell-ready .cx-bc-create-form .adminjs_Select [class*='-control'] {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  body.cx-shell-ready .cx-bc-create-form textarea {
    min-height: 116px !important;
  }

  body.cx-shell-ready .cx-bc-create-form input[type='file'] {
    font-size: 0 !important;
  }

  body.cx-shell-ready .cx-bc-create-form input[type='file']::file-selector-button {
    width: 100%;
    margin-right: 0;
    font-size: 14px;
  }

  body.cx-shell-ready .cx-bc-create-form .cx-bc-field-file .adminjs_Text,
  body.cx-shell-ready .cx-bc-create-form .cx-bc-field-file p {
    font-size: 12px !important;
    color: var(--cx-muted) !important;
  }

  body.cx-shell-ready .cx-bc-create-form .cx-bc-create-actions {
    position: static !important;
    margin: 6px 0 0 !important;
    padding: 12px 0 0 !important;
    background: transparent !important;
    border-top: 1px solid var(--cx-border-soft) !important;
  }

  body.cx-shell-ready .cx-bc-create-form .cx-bc-create-actions button {
    flex: 1 1 0 !important;
    min-height: 42px !important;
    margin-left: 0 !important;
  }
}
