@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap");

/* UZURAI shared visual layer, adapted from apps/web Sidebar/AppLayout */
:root {
  --uz-bg: #ffffff;
  --uz-ink: #0f2414;
  --uz-ink-2: #2a4532;
  --uz-muted: #5a7463;
  --uz-muted-2: #7a927f;
  --uz-line: #d1d8d3;
  --uz-soft: #f8f7f0;
  --uz-soft-2: #fbfaf5;
  --uz-accent: #5a7a42;
  --uz-card: #ffffff;
  --uz-danger: #b42318;
  --uz-radius: 8px;
  --uz-shadow: 0 18px 48px rgba(15, 36, 20, 0.10);
  --uz-shadow-soft: 0 10px 24px rgba(15, 36, 20, 0.07);
  --uz-font: "JetBrains Mono", "DM Sans", ui-monospace, SFMono-Regular, Menlo, monospace;
  --uz-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  background: var(--uz-bg);
}

body.uz-modern-page {
  --gold: var(--uz-line);
  --warn: var(--uz-accent);
  color: var(--uz-ink);
  background: var(--uz-bg);
  font-family: var(--uz-font);
}

.uz-app-shell {
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  background: var(--uz-bg);
}

.uz-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 320px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px;
  color: var(--uz-ink);
  background: #ffffff;
  border-right: 1px solid var(--uz-line);
  box-shadow: 24px 0 46px rgba(15, 36, 20, 0.10);
  transform: translateX(-100%);
  transition: transform .28s ease;
}

body.uz-sidebar-open .uz-sidebar {
  transform: translateX(0);
}

.uz-sidebar-toggle {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 70;
  width: 30px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #ffffff;
  color: var(--uz-ink-2);
  box-shadow: 0 12px 28px rgba(15, 36, 20, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  transition: width .16s ease, opacity .16s ease, left .28s ease;
}

.uz-sidebar-toggle:hover {
  width: 38px;
}

body.uz-sidebar-open .uz-sidebar-toggle {
  left: 320px;
}

.uz-sidebar-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
}

body.uz-sidebar-open .uz-sidebar-toggle svg {
  transform: rotate(180deg);
}

.uz-brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--uz-line);
}

.uz-brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-line);
  border-radius: 8px;
  background: var(--uz-soft);
  color: var(--uz-ink);
  font-weight: 950;
  letter-spacing: 0;
}

.uz-brand-kicker {
  margin: 0 0 3px;
  font-family: var(--uz-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--uz-accent);
}

.uz-brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.05;
  color: var(--uz-ink);
}

.uz-brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--uz-muted);
}

.uz-side-section {
  margin-bottom: 20px;
}

.uz-side-head {
  margin-bottom: 8px;
  padding: 0 4px;
}

.uz-side-label {
  margin: 0;
  font-family: var(--uz-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--uz-accent);
}

.uz-side-context {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--uz-muted-2);
}

.uz-side-list {
  display: grid;
  gap: 4px;
}

.uz-side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--uz-muted);
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.uz-side-link::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  background: transparent;
  transition: background .14s ease;
}

.uz-side-link:hover,
.uz-side-link.is-active {
  color: var(--uz-ink);
  background: var(--uz-soft);
  border-color: var(--uz-line);
}

.uz-side-link.is-active::before {
  background: var(--uz-accent);
}

.uz-side-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-line);
  border-radius: 0;
  background: #ffffff;
  color: var(--uz-ink-2);
  transition: border-color .14s ease;
}

.uz-side-link:hover .uz-side-icon,
.uz-side-link.is-active .uz-side-icon {
  border-color: var(--uz-accent);
}

.uz-side-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
}

.uz-side-copy {
  min-width: 0;
  flex: 1;
}

.uz-side-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.uz-side-help {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--uz-muted);
}

.uz-support-card {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--uz-line);
}

.uz-support-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--uz-line);
  background: var(--uz-soft);
}

.uz-main-shell {
  min-width: 0;
  flex: 1;
  padding: 24px clamp(18px, 3vw, 36px) 36px;
}

.uz-runtime-hooks {
  display: none !important;
}

.uz-modern-page .container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0;
}

.uz-modern-page .header {
  position: sticky;
  top: 16px;
  z-index: 12;
  border: 1px solid var(--uz-line);
  border-left: 3px solid var(--uz-accent);
  border-radius: var(--uz-radius);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--uz-shadow-soft);
  padding: 14px 16px;
}

.uz-modern-page .header h1 {
  color: var(--uz-ink);
  font-size: 20px;
  letter-spacing: 0;
}

.uz-modern-page .header h1::before {
  display: none;
}

.uz-modern-page .user-info {
  color: var(--uz-muted);
  font-weight: 800;
}

.uz-modern-page .tabs,
.uz-modern-page .bip-tabs {
  position: sticky;
  top: 0;
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: var(--uz-radius);
  background: rgba(248, 247, 240, .86);
  box-shadow: inset 0 0 0 1px rgba(209, 216, 211, .72);
  backdrop-filter: blur(10px);
}

.uz-modern-page .tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.uz-modern-page .tab,
.uz-modern-page .bip-tab {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--uz-line);
  border-radius: var(--uz-radius);
  background: #ffffff;
  color: var(--uz-ink-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(15, 36, 20, .05);
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.uz-modern-page .tab {
  width: 100%;
}

.uz-modern-page .tab:hover,
.uz-modern-page .bip-tab:hover {
  border-color: var(--uz-accent);
  color: var(--uz-ink);
  background: var(--uz-soft-2);
}

.uz-modern-page .tab[aria-selected="true"],
.uz-modern-page .bip-tab.active {
  color: var(--uz-ink);
  background: var(--uz-soft);
  border: 1px solid var(--uz-accent);
  box-shadow: inset 0 0 0 1px rgba(90, 122, 66, .18);
}

.uz-modern-page .tab-panel,
.uz-modern-page .form-card,
.uz-modern-page .filter-section,
.uz-modern-page .summary-section,
.uz-modern-page .metric-card,
.uz-modern-page .chart-card,
.uz-modern-page .card,
.uz-modern-page .bip-section,
.uz-modern-page .bip-kpi,
.uz-modern-page .bip-config-section,
.uz-modern-page .bip-price-item,
.uz-modern-page .ei-section,
.uz-modern-page .ei-kpi,
.uz-modern-page .ei-card,
.uz-modern-page .bip-goal-card,
.uz-modern-page .bip-insight,
.uz-modern-page .bip-sigma-card {
  border-radius: var(--uz-radius);
  border-color: var(--uz-line);
  border-left-color: var(--uz-line);
  border-top-color: var(--uz-line);
  background: var(--uz-card);
  background-image: none;
  box-shadow: none;
}

.uz-modern-page .tab-panel {
  border-top: 1px solid var(--uz-line);
  padding: 18px;
}

.uz-modern-page .form-card,
.uz-modern-page .bip-section {
  border-top: 1px solid var(--uz-line);
}

.uz-modern-page .form-title,
.uz-modern-page .summary-title,
.uz-modern-page .chart-card h3,
.uz-modern-page .metric-title,
.uz-modern-page .bip-section-title {
  color: var(--uz-ink);
  letter-spacing: 0;
}

.uz-modern-page .section-divider {
  border: 1px solid var(--uz-line);
  border-radius: var(--uz-radius);
  background: var(--uz-soft);
  color: var(--uz-ink);
}

.uz-modern-page .metric-card,
.uz-modern-page .lote-item {
  border-left-color: var(--uz-line) !important;
}

.uz-modern-page .bip-alert.warning,
.uz-modern-page .ei-badge.atencao,
.uz-modern-page .ei-timeline-day.warn,
.uz-modern-page .ei-tip,
.uz-modern-page [style*="#fef3c7"],
.uz-modern-page [style*="#fffbeb"] {
  background: var(--uz-soft) !important;
  border-color: var(--uz-line) !important;
  color: var(--uz-ink-2) !important;
}

.uz-modern-page .bip-kpi.orange .bip-kpi-value,
.uz-modern-page .bip-goal-value {
  color: var(--uz-accent) !important;
}

.uz-modern-page .bip-rec-priority.medium,
.uz-modern-page .bip-score-circle.average,
.uz-modern-page .bip-goal-progress-bar.behind,
.uz-modern-page .bip-corr-indicator.weak-neg {
  background: var(--uz-accent) !important;
}

.uz-modern-page input,
.uz-modern-page select,
.uz-modern-page textarea {
  border-radius: var(--uz-radius);
  border-color: var(--uz-line);
  background: #ffffff;
  color: var(--uz-ink);
}

.uz-modern-page input:focus,
.uz-modern-page select:focus,
.uz-modern-page textarea:focus {
  outline: 2px solid var(--uz-accent);
  outline-offset: 2px;
  border-color: var(--uz-line);
  box-shadow: none;
}

.uz-modern-page .btn {
  border-radius: var(--uz-radius);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: none;
}

.uz-modern-page .btn:not(.btn-ghost):not(.btn-danger),
.uz-modern-page .bip-password-btn {
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
  color: #ffffff !important;
  box-shadow: none;
}

.uz-modern-page .btn-ghost {
  background: #ffffff;
  border-color: var(--uz-line);
  color: var(--uz-ink-2);
}

.uz-modern-page .btn:hover,
.uz-modern-page .bip-password-btn:hover {
  filter: brightness(.97);
}

.uz-modern-page .bip-kpi {
  position: relative;
  overflow: hidden;
}

.uz-modern-page .bip-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--uz-accent);
}

.uz-modern-page .bip-kpi-value,
.uz-modern-page .metric-value {
  color: var(--uz-ink);
}

.uz-modern-page .bip-table th {
  background: var(--uz-soft);
  color: var(--uz-ink);
}

.uz-modern-page .bip-password-overlay {
  background: rgba(15, 36, 20, .24);
  backdrop-filter: blur(12px);
}

.uz-modern-page .bip-password-box {
  border-radius: var(--uz-radius);
  box-shadow: var(--uz-shadow);
}

@media (min-width: 1180px) {
  body.uz-sidebar-open .uz-main-shell {
    padding-left: calc(320px + clamp(18px, 3vw, 36px));
  }
}

@media (max-width: 1020px) {
  .uz-sidebar {
    width: min(320px, 88vw);
  }

  body.uz-sidebar-open .uz-sidebar-toggle {
    left: min(320px, 88vw);
  }

  .uz-main-shell {
    padding: 14px;
  }

  .uz-modern-page .header {
    position: relative;
    top: auto;
  }
}

@media (max-width: 680px) {
  .uz-modern-page .header,
  .uz-modern-page .header-actions {
    align-items: stretch;
  }

  .uz-modern-page .header {
    grid-template-columns: 1fr;
  }

  .uz-modern-page .tabs,
  .uz-modern-page .bip-tabs {
    overflow-x: auto;
  }

  .uz-modern-page .tabs {
    grid-template-columns: 1fr;
  }
}

/* Premium production polish: stronger than the legacy inline stylesheet. */
html body.uz-modern-page {
  --uz-bg: #f6f7f3;
  --uz-card: #ffffff;
  --uz-ink: #102516;
  --uz-ink-2: #243f2b;
  --uz-muted: #607568;
  --uz-line: #d7ded8;
  --uz-soft: #f3f5ef;
  --uz-soft-2: #fafbf7;
  --uz-accent: #58783f;
  background:
    linear-gradient(180deg, #fbfcf8 0%, #f5f7f2 42%, #ffffff 100%) !important;
  color: var(--uz-ink) !important;
  font-family: var(--uz-font) !important;
  font-feature-settings: "rlig" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

html body.uz-modern-page * {
  letter-spacing: 0 !important;
}

body.uz-modern-page .uz-main-shell {
  padding: 28px clamp(18px, 3vw, 40px) 40px;
}

body.uz-modern-page .container {
  max-width: 1540px !important;
}

body.uz-modern-page .tabs,
body.uz-modern-page .bip-tabs {
  position: sticky !important;
  top: 0 !important;
  z-index: 28 !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 10px !important;
  margin: 0 0 18px !important;
  border: 1px solid rgba(215, 222, 216, .86) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: 0 12px 34px rgba(16, 37, 22, .07) !important;
  backdrop-filter: blur(16px);
}

body.uz-modern-page .tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.uz-modern-page .bip-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

body.uz-modern-page .tab,
body.uz-modern-page .bip-tab {
  width: 100% !important;
  min-height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 16px !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--uz-ink-2) !important;
  font-family: var(--uz-font) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  white-space: normal !important;
  box-shadow: 0 1px 0 rgba(16, 37, 22, .04), 0 10px 24px rgba(16, 37, 22, .045) !important;
  cursor: pointer !important;
}

body.uz-modern-page .tab:hover,
body.uz-modern-page .bip-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 120, 63, .55) !important;
  background: var(--uz-soft-2) !important;
  color: var(--uz-ink) !important;
}

body.uz-modern-page .tab[aria-selected="true"],
body.uz-modern-page .bip-tab.active {
  border-color: rgba(88, 120, 63, .75) !important;
  background: linear-gradient(180deg, #f8faf5 0%, #eef3e9 100%) !important;
  color: var(--uz-ink) !important;
  box-shadow: inset 0 0 0 1px rgba(88, 120, 63, .18), 0 10px 24px rgba(16, 37, 22, .06) !important;
}

body.uz-modern-page .tab-panel,
body.uz-modern-page .form-card,
body.uz-modern-page .filter-section,
body.uz-modern-page .summary-section,
body.uz-modern-page .metric-card,
body.uz-modern-page .chart-card,
body.uz-modern-page .card,
body.uz-modern-page .bip-section,
body.uz-modern-page .bip-kpi,
body.uz-modern-page .bip-config-section,
body.uz-modern-page .bip-price-item,
body.uz-modern-page .ei-section,
body.uz-modern-page .ei-kpi,
body.uz-modern-page .ei-card {
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .96) !important;
  background-image: none !important;
  box-shadow: 0 14px 34px rgba(16, 37, 22, .055) !important;
}

body.uz-modern-page .tab-panel {
  padding: clamp(16px, 2vw, 24px) !important;
}

body.uz-modern-page .form-title,
body.uz-modern-page .summary-title,
body.uz-modern-page .chart-card h3,
body.uz-modern-page .metric-title,
body.uz-modern-page .bip-section-title,
body.uz-modern-page .ei-section-title,
body.uz-modern-page .bip-config-title {
  color: var(--uz-ink) !important;
  font-family: var(--uz-font) !important;
  font-weight: 900 !important;
}

body.uz-modern-page input,
body.uz-modern-page select,
body.uz-modern-page textarea {
  min-height: 42px;
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--uz-ink) !important;
  font-family: var(--uz-font) !important;
  box-shadow: inset 0 1px 0 rgba(16, 37, 22, .03) !important;
}

body.uz-modern-page .btn,
body.uz-modern-page button.btn {
  border-radius: 10px !important;
  font-family: var(--uz-font) !important;
  font-weight: 850 !important;
}

body.uz-modern-page .report-table,
body.uz-modern-page .bip-table {
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 28px rgba(16, 37, 22, .045) !important;
}

body.uz-modern-page .report-table thead th,
body.uz-modern-page .bip-table th {
  background: var(--uz-soft) !important;
  color: var(--uz-ink) !important;
  font-family: var(--uz-font) !important;
  font-weight: 900 !important;
}

body.uz-modern-page :is(.glass-card, .panel, .dashboard-card, .summary-card, .stat-card, .kpi-card, .metric-card, .module-card, .box, .widget, .section-card) {
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 14px 34px rgba(16, 37, 22, .055) !important;
}

body.uz-modern-page :is(header, .header, .topbar, .navbar, .brandbar):not(.uz-sidebar *) {
  border-color: var(--uz-line) !important;
  background: rgba(255, 255, 255, .92) !important;
  color: var(--uz-ink) !important;
  box-shadow: 0 10px 28px rgba(16, 37, 22, .06) !important;
  backdrop-filter: blur(14px);
}

body.uz-modern-page :is(h1, h2, h3, h4, .title, .page-title, .section-title) {
  color: var(--uz-ink) !important;
  font-family: var(--uz-font) !important;
  font-weight: 900 !important;
}

body.uz-modern-page :is(.subtitle, .muted, .text-muted, small, .hint, .description) {
  color: var(--uz-muted) !important;
}

body.uz-modern-page :is(.btn-primary, .primary, button[type="submit"], .bg-blue-600, .bg-indigo-600) {
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
  color: #ffffff !important;
}

body.uz-modern-page :is(.btn-secondary, .secondary, .ghost, .btn-ghost) {
  background: #ffffff !important;
  border-color: var(--uz-line) !important;
  color: var(--uz-ink-2) !important;
}

body.uz-modern-page :is(table) {
  border-color: var(--uz-line) !important;
  font-family: var(--uz-font) !important;
}

body.uz-modern-page :is(th) {
  background: var(--uz-soft) !important;
  color: var(--uz-ink) !important;
  font-weight: 900 !important;
}

body.uz-modern-page :is(td, th) {
  border-color: var(--uz-line) !important;
}

body.uz-modern-page,
body.uz-modern-page :is(input, select, textarea, button, table, label, a, p, span, div, small, strong, h1, h2, h3, h4, h5, h6) {
  font-family: var(--uz-font) !important;
}

body.uz-modern-page ::selection {
  background: rgba(88, 120, 63, .22);
  color: var(--uz-ink);
}

body.uz-modern-page ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.uz-modern-page ::-webkit-scrollbar-track {
  background: transparent;
}

body.uz-modern-page ::-webkit-scrollbar-thumb {
  background: #cbd4cc;
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

body.uz-modern-page ::-webkit-scrollbar-thumb:hover {
  background: #9fac9f;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* Global shell shared by every module. Restrained, current SaaS/admin style. */
body.uz-global-enabled {
  padding-top: 74px !important;
}

body.uz-global-enabled:not(.uz-sidebar-open) {
  padding-left: 0;
}

.uz-global-topbar {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  z-index: 9000 !important;
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 10px clamp(14px, 2vw, 28px) !important;
  border-bottom: 1px solid rgba(215, 222, 216, .88) !important;
  background: rgba(255, 255, 255, .88) !important;
  color: var(--uz-ink) !important;
  box-shadow: 0 12px 30px rgba(16, 37, 22, .06) !important;
  backdrop-filter: blur(18px) saturate(1.2);
}

.uz-global-toggle {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--uz-ink-2) !important;
  box-shadow: 0 8px 18px rgba(16, 37, 22, .06) !important;
  cursor: pointer !important;
}

.uz-global-toggle svg {
  width: 18px;
  height: 18px;
}

.uz-global-rail-toggle {
  position: fixed !important;
  left: 0 !important;
  top: 50% !important;
  z-index: 9001 !important;
  width: 28px !important;
  height: 62px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--uz-line) !important;
  border-left: 0 !important;
  border-radius: 0 10px 10px 0 !important;
  background: rgba(255, 255, 255, .92) !important;
  color: var(--uz-ink-2) !important;
  box-shadow: 0 12px 28px rgba(16, 37, 22, .10) !important;
  cursor: pointer !important;
  transform: translateY(-50%) !important;
  transition: left .24s ease, width .16s ease, background .16s ease !important;
  backdrop-filter: blur(12px);
}

.uz-global-rail-toggle:hover {
  width: 36px !important;
  background: #ffffff !important;
}

.uz-global-rail-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
}

body.uz-global-open .uz-global-rail-toggle {
  left: 310px !important;
}

body.uz-global-open .uz-global-rail-toggle svg {
  transform: rotate(180deg);
}

.uz-global-page {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.uz-global-page-kicker,
.uz-global-kicker,
.uz-global-section-title {
  font-family: var(--uz-mono) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  color: var(--uz-muted) !important;
}

.uz-global-page-title {
  max-width: min(58vw, 720px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--uz-font) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: var(--uz-ink) !important;
}

.uz-global-status {
  margin-left: auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--uz-line);
  border-radius: 999px;
  background: var(--uz-soft-2);
  color: var(--uz-ink-2);
  font-size: 12px;
  font-weight: 800;
}

.uz-global-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--uz-accent);
  box-shadow: 0 0 0 4px rgba(88, 120, 63, .12);
}

.uz-global-shell {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 8999;
  width: 310px;
  height: 100vh;
  padding: 78px 14px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--uz-line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 22px 0 44px rgba(16, 37, 22, .10);
  transform: translateX(-100%);
  transition: transform .24s ease;
}

body.uz-global-open .uz-global-shell {
  transform: translateX(0);
}

.uz-global-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--uz-line);
}

.uz-global-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-line);
  border-radius: 10px;
  background: var(--uz-soft);
  color: var(--uz-ink);
  font-weight: 950;
}

.uz-global-title {
  font-size: 16px;
  font-weight: 950;
  color: var(--uz-ink);
}

.uz-global-section {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.uz-global-section-title {
  padding: 0 4px 2px;
}

.uz-global-search {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 0 12px;
  border: 1px solid var(--uz-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--uz-muted);
  box-shadow: inset 0 1px 0 rgba(16, 37, 22, .03);
}

.uz-global-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.uz-global-search-input {
  width: 100%;
  min-height: 0 !important;
  height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--uz-ink) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.uz-global-search-input::placeholder {
  color: var(--uz-muted-2);
}

.uz-global-favorites-section {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--uz-line);
}

.uz-global-favorites-list {
  display: grid;
  gap: 6px;
}

.uz-global-empty {
  padding: 10px;
  border: 1px dashed var(--uz-line);
  border-radius: 10px;
  color: var(--uz-muted);
  font-size: 11px;
  font-weight: 750;
}

.uz-global-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
}

.uz-global-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--uz-muted) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 850;
}

.uz-global-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--uz-ink-2);
}

.uz-global-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.uz-global-link:hover,
.uz-global-link.is-active {
  border-color: var(--uz-line);
  background: var(--uz-soft);
  color: var(--uz-ink) !important;
}

.uz-global-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c9d2ca;
}

.uz-global-link.is-active .uz-global-dot {
  background: var(--uz-accent);
  box-shadow: 0 0 0 4px rgba(88, 120, 63, .12);
}

.uz-global-fav-toggle {
  width: 32px !important;
  height: 32px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #bac5bc !important;
  font-size: 14px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.uz-global-fav-toggle:hover {
  border-color: var(--uz-line) !important;
  background: #ffffff !important;
  color: var(--uz-muted) !important;
}

.uz-global-fav-toggle.is-favorite {
  color: var(--uz-accent) !important;
}

.uz-global-favorite-link {
  border-color: rgba(88, 120, 63, .22);
  background: var(--uz-soft-2);
}

@media (min-width: 1280px) {
  body.uz-global-open {
    padding-left: 310px !important;
  }
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 68px !important;
  }

  .uz-global-topbar {
    height: 60px !important;
    padding-inline: 10px !important;
  }

  .uz-global-status {
    display: none;
  }

  .uz-global-shell {
    width: min(310px, 88vw);
  }

  .uz-global-rail-toggle {
    display: none !important;
  }
}

/* Global feedback layer: toast, loading, dialogs and action states. */
#uz-ui-root {
  position: relative;
  z-index: 20000;
  font-family: var(--uz-font);
}

.uz-toast-stack {
  position: fixed;
  top: 78px;
  right: 18px;
  z-index: 20020;
  width: min(380px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.uz-toast {
  min-height: 52px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border: 1px solid var(--uz-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  color: var(--uz-ink);
  box-shadow: 0 18px 46px rgba(16, 37, 22, .12);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: uzToastIn .18s ease both;
}

.uz-toast.is-leaving {
  animation: uzToastOut .16s ease both;
}

.uz-toast-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--uz-accent);
  box-shadow: 0 0 0 4px rgba(88, 120, 63, .12);
}

.uz-toast-success .uz-toast-dot { background: #278553; }
.uz-toast-error .uz-toast-dot { background: #b42318; }
.uz-toast-warning .uz-toast-dot { background: #8a6d2f; }
.uz-toast-info .uz-toast-dot { background: var(--uz-accent); }

.uz-toast-message {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.uz-toast-close,
.uz-dialog-close {
  border: 0 !important;
  background: transparent !important;
  color: var(--uz-muted) !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.uz-toast-close {
  width: 28px !important;
  height: 28px !important;
  font-size: 18px !important;
}

.uz-loading-overlay,
.uz-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 20010;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 37, 22, .18);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: opacity .16s ease;
}

.uz-loading-overlay.is-open,
.uz-dialog-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.uz-loading-overlay[hidden],
.uz-dialog-overlay[hidden] {
  display: none;
}

.uz-loading-card,
.uz-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--uz-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 68px rgba(16, 37, 22, .20);
}

.uz-loading-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
}

.uz-spinner {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid #e4e9e3;
  border-top-color: var(--uz-accent);
  animation: uzSpin .76s linear infinite;
}

.uz-loading-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--uz-ink);
}

.uz-loading-message {
  font-size: 12px;
  font-weight: 750;
  color: var(--uz-muted);
  text-align: center;
}

.uz-dialog {
  overflow: hidden;
  transform: translateY(8px) scale(.98);
  transition: transform .16s ease;
}

.uz-dialog-overlay.is-open .uz-dialog {
  transform: translateY(0) scale(1);
}

.uz-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--uz-line);
}

.uz-dialog-kicker {
  margin-bottom: 4px;
  color: var(--uz-muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.uz-dialog h2 {
  margin: 0;
  color: var(--uz-ink);
  font-size: 17px;
  font-weight: 950;
}

.uz-dialog-close {
  width: 32px !important;
  height: 32px !important;
  font-size: 22px !important;
}

.uz-dialog-body {
  padding: 16px 18px;
}

.uz-dialog-message {
  margin: 0;
  color: var(--uz-ink-2);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
  white-space: pre-wrap;
}

.uz-dialog-input {
  width: 100%;
  margin-top: 14px;
}

.uz-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--uz-line);
}

.uz-dialog-cancel,
.uz-dialog-confirm {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.uz-dialog-cancel {
  border: 1px solid var(--uz-line);
  background: #ffffff;
  color: var(--uz-ink-2);
}

.uz-dialog-confirm {
  border: 1px solid var(--uz-accent);
  background: var(--uz-accent);
  color: #ffffff;
}

.uz-action-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: .82 !important;
}

.uz-action-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  display: inline-block;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  vertical-align: -2px;
  animation: uzSpin .72s linear infinite;
}

@keyframes uzSpin {
  to { transform: rotate(360deg); }
}

@keyframes uzToastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes uzToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 640px) {
  .uz-toast-stack {
    top: 70px;
    right: 10px;
  }

  .uz-dialog-actions {
    flex-direction: column-reverse;
  }

  .uz-dialog-cancel,
  .uz-dialog-confirm {
    width: 100%;
  }
}

@media (max-width: 680px) {
  body.uz-modern-page .tabs,
  body.uz-modern-page .bip-tabs {
    grid-template-columns: 1fr !important;
  }

  body.uz-modern-page .tab,
  body.uz-modern-page .bip-tab {
    min-height: 48px !important;
  }
}

/* ===== UZURAI SaaS refresh 2026-05-07 ===== */
:root {
  --uz-bg: #f4f7f3;
  --uz-surface: #ffffff;
  --uz-surface-2: #f9fbf7;
  --uz-ink: #101a13;
  --uz-ink-2: #26382b;
  --uz-muted: #607268;
  --uz-muted-2: #8a998f;
  --uz-line: #dfe7dc;
  --uz-line-2: #edf2ea;
  --uz-accent: #315b3b;
  --uz-accent-2: #6d8a4e;
  --uz-success: #19764a;
  --uz-warning: #9a6a13;
  --uz-danger: #b42318;
  --uz-focus: rgba(49, 91, 59, .22);
  --uz-radius: 8px;
  --uz-radius-lg: 10px;
  --uz-shadow: 0 18px 50px rgba(20, 38, 25, .12);
  --uz-shadow-soft: 0 10px 28px rgba(20, 38, 25, .08);
  --uz-font: "JetBrains Mono", "DM Sans", ui-monospace, SFMono-Regular, Menlo, monospace;
  --uz-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  background: var(--uz-bg) !important;
}

body.uz-modern-page {
  min-height: 100vh;
  color: var(--uz-ink) !important;
  background:
    linear-gradient(90deg, rgba(49, 91, 59, .045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, #fbfcf8 0%, var(--uz-bg) 44%, #eef4ea 100%) !important;
  font-family: var(--uz-font) !important;
  letter-spacing: 0 !important;
}

body.uz-modern-page * {
  letter-spacing: 0 !important;
}

body.uz-modern-page :focus-visible {
  outline: 3px solid var(--uz-focus) !important;
  outline-offset: 2px !important;
}

body.uz-global-enabled {
  padding-top: 70px !important;
}

@media (min-width: 1180px) {
  body.uz-global-enabled.uz-global-open {
    padding-left: 316px !important;
  }
}

.uz-global-topbar {
  height: 70px !important;
  padding: 10px 18px !important;
  background: rgba(255, 255, 255, .9) !important;
  border-bottom: 1px solid var(--uz-line) !important;
  box-shadow: 0 10px 30px rgba(21, 39, 26, .08) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
}

@media (min-width: 1180px) {
  body.uz-global-open .uz-global-topbar {
    left: 316px !important;
  }
}

.uz-global-toggle,
.uz-global-rail-toggle,
.uz-sidebar-toggle {
  border-radius: 8px !important;
  border: 1px solid var(--uz-line) !important;
  background: var(--uz-surface) !important;
  color: var(--uz-ink-2) !important;
  box-shadow: 0 8px 22px rgba(20, 38, 25, .09) !important;
}

.uz-global-toggle:hover,
.uz-global-rail-toggle:hover,
.uz-sidebar-toggle:hover {
  background: var(--uz-surface-2) !important;
  border-color: #c9d7c4 !important;
  color: var(--uz-accent) !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle {
  width: 34px !important;
  height: 68px !important;
  border-left: 0 !important;
  border-radius: 0 10px 10px 0 !important;
}

body.uz-global-open .uz-global-rail-toggle {
  left: 316px !important;
}

.uz-global-page-title {
  color: var(--uz-ink) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.uz-global-page-kicker,
.uz-global-kicker,
.uz-global-section-title,
.uz-side-label,
.uz-brand-kicker,
.uz-dialog-kicker {
  color: var(--uz-accent) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.uz-global-status {
  border-radius: 999px !important;
  border-color: var(--uz-line) !important;
  background: var(--uz-surface-2) !important;
  color: var(--uz-muted) !important;
}

.uz-global-status span {
  background: var(--uz-success) !important;
  box-shadow: 0 0 0 4px rgba(25, 118, 74, .12) !important;
}

.uz-global-shell,
.uz-sidebar {
  width: 316px !important;
  padding: 14px !important;
  background: rgba(255, 255, 255, .94) !important;
  border-right: 1px solid var(--uz-line) !important;
  box-shadow: 18px 0 44px rgba(16, 30, 20, .14) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  scrollbar-width: thin;
  scrollbar-color: #c7d5c2 transparent;
}

.uz-global-shell {
  transform: translateX(-102%) !important;
}

body.uz-global-open .uz-global-shell {
  transform: translateX(0) !important;
}

.uz-global-brand,
.uz-brand-block {
  min-height: 72px !important;
  margin: 0 0 14px !important;
  padding: 10px !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: var(--uz-surface-2) !important;
}

.uz-global-mark,
.uz-brand-mark {
  width: 46px !important;
  height: 46px !important;
  border-radius: 8px !important;
  border: 1px solid #cddbc8 !important;
  background: #edf5e9 !important;
  color: var(--uz-accent) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65) !important;
}

.uz-global-title,
.uz-brand-title {
  color: var(--uz-ink) !important;
  font-size: 17px !important;
  font-weight: 950 !important;
}

.uz-global-search {
  height: 44px !important;
  margin-bottom: 14px !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 8px !important;
  background: var(--uz-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8) !important;
}

.uz-global-search:focus-within {
  border-color: #b8ccb1 !important;
  box-shadow: 0 0 0 4px var(--uz-focus) !important;
}

.uz-global-section,
.uz-side-section {
  margin-bottom: 16px !important;
}

.uz-global-section-title,
.uz-side-label {
  padding: 0 5px 5px !important;
}

.uz-global-link-row {
  grid-template-columns: minmax(0, 1fr) 32px !important;
  gap: 5px !important;
}

.uz-global-link,
.uz-side-link {
  min-height: 42px !important;
  padding: 7px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--uz-muted) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.uz-global-link:hover,
.uz-side-link:hover,
.uz-global-link.is-active,
.uz-side-link.is-active {
  color: var(--uz-ink) !important;
  background: #f2f7ef !important;
  border-color: #d7e4d1 !important;
}

.uz-global-link.is-active,
.uz-side-link.is-active {
  box-shadow: inset 3px 0 0 var(--uz-accent) !important;
}

.uz-global-icon,
.uz-side-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  border: 1px solid var(--uz-line) !important;
  background: var(--uz-surface) !important;
  color: var(--uz-accent) !important;
}

.uz-global-link:hover .uz-global-icon,
.uz-side-link:hover .uz-side-icon,
.uz-global-link.is-active .uz-global-icon,
.uz-side-link.is-active .uz-side-icon {
  border-color: #c7d9bf !important;
  background: #e9f3e4 !important;
}

.uz-side-copy {
  min-width: 0 !important;
}

.uz-side-title,
.uz-side-help {
  display: block !important;
}

.uz-side-help {
  margin-top: 1px !important;
  color: var(--uz-muted-2) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

.uz-global-fav-toggle {
  border-radius: 8px !important;
  color: #b5c1b2 !important;
}

.uz-global-fav-toggle.is-favorite {
  background: #eff7e9 !important;
  color: var(--uz-accent) !important;
  border-color: #cfdec7 !important;
}

.uz-global-empty {
  border-radius: 8px !important;
  background: var(--uz-surface-2) !important;
}

body.uz-modern-page :is(.container, main, .main, .content, .page, .wrap, .wrapper) {
  max-width: min(1480px, calc(100vw - 28px)) !important;
}

body.uz-modern-page :is(.header, header.header, .page-header, .topbar, .toolbar):not(.uz-global-topbar) {
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: var(--uz-shadow-soft) !important;
}

body.uz-modern-page :is(.card, .panel, .box, .widget, .section, .section-card, .glass-card, .dashboard-card, .summary-card, .stat-card, .kpi-card, .metric-card, .module-card, .form-card, .filter-section, .summary-section, .chart-card, .tab-panel, .bip-section, .ei-section, .ei-card, .bip-kpi, .ei-kpi, .lote-item) {
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .94) !important;
  background-image: none !important;
  box-shadow: 0 12px 32px rgba(16, 30, 20, .07) !important;
}

body.uz-modern-page :is(.card, .panel, .box, .widget, .section, .section-card, .glass-card, .dashboard-card, .summary-card, .stat-card, .kpi-card, .metric-card, .module-card, .form-card, .filter-section, .summary-section, .chart-card, .tab-panel, .bip-section, .ei-section, .ei-card, .bip-kpi, .ei-kpi, .lote-item):hover {
  border-color: #cfdec9 !important;
}

body.uz-modern-page :is(h1, h2, h3, h4, .summary-title, .metric-title, .section-title, .card-title, .chart-card h3, .bip-section-title, .ei-section-title) {
  color: var(--uz-ink) !important;
  font-weight: 900 !important;
}

body.uz-modern-page :is(p, small, label, .muted, .subtitle, .description, .help, .hint) {
  color: var(--uz-muted) !important;
}

body.uz-modern-page :is(input, select, textarea) {
  min-height: 38px;
  border: 1px solid var(--uz-line) !important;
  border-radius: 8px !important;
  background: var(--uz-surface) !important;
  color: var(--uz-ink) !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(input, select, textarea):focus {
  border-color: #b5cdb0 !important;
  box-shadow: 0 0 0 4px var(--uz-focus) !important;
}

body.uz-modern-page :is(button, .btn, [role="button"], input[type="button"], input[type="submit"]) {
  border-radius: 8px !important;
  font-family: var(--uz-font) !important;
  font-weight: 850 !important;
  box-shadow: none !important;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease !important;
}

body.uz-modern-page :is(button, .btn, [role="button"], input[type="button"], input[type="submit"]):hover {
  transform: translateY(-1px);
}

body.uz-modern-page :is(.btn-primary, .primary, button[type="submit"], .bg-blue-600, .bg-indigo-600, .ei-btn, .bip-btn) {
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
  color: #fff !important;
}

body.uz-modern-page :is(.btn-primary, .primary, button[type="submit"], .bg-blue-600, .bg-indigo-600, .ei-btn, .bip-btn):hover {
  background: #244b30 !important;
  border-color: #244b30 !important;
  box-shadow: 0 10px 22px rgba(49, 91, 59, .18) !important;
}

body.uz-modern-page :is(.btn-secondary, .secondary, .btn-ghost, .ghost) {
  border-color: var(--uz-line) !important;
  background: var(--uz-surface) !important;
  color: var(--uz-ink-2) !important;
}

body.uz-modern-page :is(.danger, .btn-danger, .delete, .remove, .bg-red-600) {
  background: #fff4f2 !important;
  border-color: #f2c8c0 !important;
  color: var(--uz-danger) !important;
}

body.uz-modern-page :is(table, .report-table, .bip-table, .data-table) {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: var(--uz-surface) !important;
}

body.uz-modern-page :is(thead, .report-table thead, .bip-table thead) {
  background: #eef5eb !important;
}

body.uz-modern-page :is(th, .report-table th, .bip-table th) {
  border-color: var(--uz-line) !important;
  background: #eef5eb !important;
  color: var(--uz-ink-2) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body.uz-modern-page :is(td, .report-table td, .bip-table td) {
  border-color: var(--uz-line-2) !important;
}

body.uz-modern-page :is(tr:hover td) {
  background: #fbfdf8 !important;
}

body.uz-modern-page :is(.tabs, .bip-tabs, .tab-list, .nav-tabs) {
  gap: 6px !important;
  padding: 6px !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.92) !important;
}

body.uz-modern-page :is(.tab, .bip-tab, [role="tab"]) {
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--uz-muted) !important;
  font-weight: 850 !important;
}

body.uz-modern-page :is(.tab.active, .tab.is-active, .tab[aria-selected="true"], .bip-tab.active, .bip-tab[aria-selected="true"], [role="tab"][aria-selected="true"]) {
  border-color: #cfdec7 !important;
  background: #edf5e9 !important;
  color: var(--uz-accent) !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(.modal, .dialog, .popup, .swal2-popup, .chart-modal-content) {
  border: 1px solid var(--uz-line) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.97) !important;
  box-shadow: 0 24px 70px rgba(16, 30, 20, .22) !important;
}

body.uz-modern-page :is(.loading, .loader, .spinner-container) {
  color: var(--uz-accent) !important;
}

.uz-toast,
.uz-loading-card,
.uz-dialog {
  border-radius: 10px !important;
  border-color: var(--uz-line) !important;
  background: rgba(255,255,255,.97) !important;
  box-shadow: 0 24px 70px rgba(16, 30, 20, .20) !important;
}

.uz-route-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30000;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.uz-route-progress span {
  display: block;
  width: 18%;
  height: 100%;
  background: var(--uz-accent);
  box-shadow: 0 0 18px rgba(49, 91, 59, .34);
  transform-origin: left center;
}

.uz-route-progress.is-active span {
  animation: uzRouteProgress 1.2s ease-in-out infinite;
}

.uz-route-progress.is-done span {
  width: 100%;
  animation: none;
}

.uz-loading-overlay,
.uz-dialog-overlay {
  background: rgba(16, 30, 20, .24) !important;
  backdrop-filter: blur(14px) saturate(130%) !important;
}

.uz-dialog-head,
.uz-dialog-actions {
  background: #fbfdf8 !important;
}

.uz-dialog-close,
.uz-toast-close {
  border-radius: 8px !important;
}

.uz-dialog-close:hover,
.uz-toast-close:hover {
  background: #eef5eb !important;
  color: var(--uz-ink) !important;
}

.uz-dialog-confirm {
  border-radius: 8px !important;
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
}

.uz-dialog-cancel {
  border-radius: 8px !important;
}

.uz-spinner,
body.uz-modern-page :is(.spinner)::before {
  border-top-color: var(--uz-accent) !important;
}

@keyframes uzRouteProgress {
  0% { transform: translateX(-20vw) scaleX(.5); }
  50% { transform: translateX(45vw) scaleX(2.4); }
  100% { transform: translateX(105vw) scaleX(.8); }
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 64px !important;
  }

  .uz-global-topbar {
    height: 64px !important;
    padding-inline: 10px !important;
  }

  .uz-global-shell,
  .uz-sidebar {
    width: min(316px, 88vw) !important;
  }
}

/* ===== UZURAI operational-tech polish 2026-05-07-02 ===== */
:root {
  --uz-bg: #ffffff;
  --uz-bg-soft: #f7f9f4;
  --uz-surface: #ffffff;
  --uz-surface-2: #f8f7f0;
  --uz-surface-3: #eef4e9;
  --uz-ink: #0f2414;
  --uz-ink-2: #263f2d;
  --uz-muted: #5a7463;
  --uz-muted-2: #7a927f;
  --uz-line: #d1d8d3;
  --uz-line-2: #e8ece7;
  --uz-accent: #5a7a42;
  --uz-accent-dark: #0f2414;
  --uz-accent-soft: #f8f7f0;
  --uz-ring: rgba(90, 122, 66, .22);
  --uz-shadow: 0 18px 48px rgba(15, 36, 20, .10);
  --uz-shadow-soft: 0 8px 22px rgba(15, 36, 20, .06);
}

body.uz-modern-page {
  background:
    linear-gradient(90deg, rgba(209, 216, 211, .34) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(180deg, #ffffff 0%, #fbfcf8 42%, #f4f7f1 100%) !important;
}

body.uz-modern-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(90, 122, 66, .08), transparent 24%),
    radial-gradient(circle at 92% 0%, rgba(90, 122, 66, .10), transparent 30%);
}

.uz-global-topbar {
  height: 58px !important;
  padding: 8px 18px !important;
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid var(--uz-line) !important;
  box-shadow: none !important;
}

body.uz-global-enabled {
  padding-top: 58px !important;
}

@media (min-width: 1180px) {
  body.uz-global-enabled.uz-global-open {
    padding-left: 320px !important;
  }

  body.uz-global-open .uz-global-topbar {
    left: 320px !important;
  }
}

.uz-global-page-title {
  font-size: 15px !important;
  font-weight: 950 !important;
}

.uz-global-page-kicker {
  font-size: 9px !important;
  letter-spacing: .16em !important;
}

.uz-global-status {
  min-height: 30px !important;
  padding: 5px 10px !important;
  background: #fff !important;
  border: 1px solid var(--uz-line) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
}

.uz-global-toggle {
  width: 38px !important;
  height: 38px !important;
  box-shadow: none !important;
}

.uz-global-shell,
.uz-sidebar {
  width: 320px !important;
  padding: 16px !important;
  background: #fff !important;
  box-shadow: 18px 0 42px rgba(15, 36, 20, .10) !important;
}

.uz-global-shell::after,
.uz-sidebar::after {
  content: "";
  position: sticky;
  bottom: -16px;
  display: block;
  height: 22px;
  margin-inline: -16px;
  background: linear-gradient(180deg, transparent, #fff);
  pointer-events: none;
}

body.uz-global-open .uz-global-rail-toggle {
  left: 320px !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle {
  height: 64px !important;
  width: 30px !important;
  background: #fff !important;
  box-shadow: 10px 0 22px rgba(15, 36, 20, .10) !important;
}

.uz-global-brand,
.uz-brand-block {
  min-height: 70px !important;
  padding: 0 0 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--uz-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.uz-global-mark,
.uz-brand-mark {
  width: 54px !important;
  height: 54px !important;
  border-radius: 0 !important;
  background:
    linear-gradient(135deg, #ffffff 0%, #f8f7f0 100%) !important;
  border: 1px solid var(--uz-line) !important;
  color: var(--uz-accent-dark) !important;
  font-size: 14px !important;
  font-weight: 950 !important;
}

.uz-global-kicker,
.uz-brand-kicker,
.uz-global-section-title,
.uz-side-label {
  letter-spacing: .18em !important;
}

.uz-global-title,
.uz-brand-title {
  font-size: 16px !important;
  letter-spacing: 0 !important;
}

.uz-global-search {
  height: 42px !important;
  border-radius: 0 !important;
  border-color: var(--uz-line) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.uz-global-search:focus-within {
  border-color: var(--uz-accent) !important;
  box-shadow: 0 0 0 3px var(--uz-ring) !important;
}

/* ===== Final sidebar handle lock 2026-05-07-06 ===== */
:root {
  --uz-sidebar-width-fixed: 320px;
  --uz-sidebar-handle-width: 42px;
  --uz-sidebar-handle-height: 72px;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle {
  position: fixed !important;
  top: 50% !important;
  left: 0 !important;
  right: auto !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  height: var(--uz-sidebar-handle-height) !important;
  min-height: var(--uz-sidebar-handle-height) !important;
  max-height: var(--uz-sidebar-handle-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
  border-radius: 0 14px 14px 0 !important;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  z-index: 2147483000 !important;
  overflow: visible !important;
}

.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active {
  top: 50% !important;
  left: 0 !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  height: var(--uz-sidebar-handle-height) !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle {
  left: min(calc(100vw - var(--uz-sidebar-handle-width)), var(--uz-sidebar-width-fixed)) !important;
  right: auto !important;
  border-radius: 0 14px 14px 0 !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
}

body.uz-global-open .uz-global-rail-toggle:hover,
body.uz-global-open .uz-global-rail-toggle:focus,
body.uz-global-open .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  left: min(calc(100vw - var(--uz-sidebar-handle-width)), var(--uz-sidebar-width-fixed)) !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  transform: translate3d(0, -50%, 0) !important;
}

.uz-global-rail-toggle::before,
.uz-sidebar-toggle::before {
  content: "";
  position: absolute;
  inset: -14px -14px -14px 0;
  pointer-events: auto;
}

.uz-global-rail-toggle svg,
.uz-sidebar-toggle svg {
  position: relative !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

/* ===== Final global header + handle authority 2026-05-07-07 ===== */
body.uz-global-enabled {
  padding-top: 64px !important;
}

.uz-global-topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 64px !important;
  z-index: 2147482500 !important;
  border-bottom: 1px solid var(--uz-line) !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--uz-ink) !important;
  box-shadow: 0 12px 34px rgba(16, 30, 20, .08) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
}

body.uz-global-open .uz-global-topbar,
.uz-global-topbar-only {
  left: 0 !important;
  width: 100% !important;
}

.uz-global-page-kicker {
  color: var(--uz-muted) !important;
  font-family: var(--uz-font-mono) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.uz-global-page-title {
  color: var(--uz-ink) !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

.uz-global-toggle,
.uz-global-mini-mark {
  border-radius: 0 !important;
  border: 1px solid var(--uz-line) !important;
  background: #fff !important;
  color: var(--uz-accent-dark) !important;
  box-shadow: none !important;
}

body.uz-global-enabled > header:not(.uz-global-topbar),
body.uz-global-enabled > .brandbar,
body.uz-global-enabled > .topbar,
body.uz-global-enabled > .navbar,
body.uz-global-enabled > .toolbar,
body.uz-global-enabled > .header,
body.uz-global-enabled > .page-header,
body.uz-global-enabled > .main-header,
body.uz-global-enabled main > .brandbar:first-child,
body.uz-global-enabled main > .topbar:first-child,
body.uz-global-enabled main > .navbar:first-child,
body.uz-global-enabled main > .toolbar:first-child,
body.uz-global-enabled main > .header:first-child,
body.uz-global-enabled main > .page-header:first-child,
body.uz-global-enabled .container > .brandbar:first-child,
body.uz-global-enabled .container > .topbar:first-child,
body.uz-global-enabled .container > .navbar:first-child,
body.uz-global-enabled .container > .toolbar:first-child,
body.uz-global-enabled .container > .header:first-child,
body.uz-global-enabled .container > .page-header:first-child,
body.uz-global-enabled .app > .header:first-child,
body.uz-global-enabled .app > .page-header:first-child,
body.uz-global-enabled .app-container > .header:first-child,
body.uz-global-enabled .app-container > .dashboard-header:first-child,
body.uz-global-enabled .uz-app-shell > .header:first-child,
body.uz-global-enabled .uz-app-shell .header:not(.lote-header):first-child {
  display: none !important;
}

body.uz-global-enabled .brandbar.sticky,
body.uz-global-enabled header.brandbar.sticky,
body.uz-global-enabled header.topbar,
body.uz-global-enabled .topbar {
  position: static !important;
  display: none !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle {
  position: fixed !important;
  top: 50% !important;
  left: 0 !important;
  right: auto !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
  border-radius: 0 14px 14px 0 !important;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  z-index: 2147483000 !important;
}

.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active {
  top: 50% !important;
  left: 0 !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 72px !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle,
body.uz-global-open .uz-global-rail-toggle:hover,
body.uz-global-open .uz-global-rail-toggle:focus,
body.uz-global-open .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  left: min(calc(100vw - 42px), 320px) !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 60px !important;
  }

  .uz-global-topbar {
    height: 60px !important;
  }
}

/* ===== Tenant modules visual baseline 2026-05-10 ===== */
:root {
  --uz-bg: #f6f8f6;
  --uz-bg-soft: #f2f5f2;
  --uz-surface: #ffffff;
  --uz-surface-2: #f8faf8;
  --uz-surface-3: #edf5ef;
  --uz-ink: #111713;
  --uz-ink-2: #25312a;
  --uz-muted: #5f6f64;
  --uz-muted-2: #7b887f;
  --uz-line: #dce4de;
  --uz-line-2: #edf1ee;
  --uz-accent: #1f7a3a;
  --uz-accent-dark: #155a2a;
  --uz-accent-soft: #e8f4ec;
  --uz-ring: rgba(31, 122, 58, .18);
  --uz-radius: 8px;
  --uz-shadow: 0 1px 2px rgba(17, 23, 19, .05);
  --uz-shadow-soft: 0 1px 2px rgba(17, 23, 19, .04);
  --brand: var(--uz-accent);
  --brand-600: var(--uz-accent-dark);
  --brand-dark: var(--uz-accent-dark);
  --brand-light: #2f8d4a;
  --brand-050: var(--uz-accent-soft);
  --accent: var(--uz-accent);
  --accent-light: var(--uz-accent-soft);
  --gold: var(--uz-accent);
  --gold-light: var(--uz-accent-soft);
  --bg: var(--uz-bg);
  --card: var(--uz-surface);
  --ink: var(--uz-ink);
  --muted: var(--uz-muted);
  --bd: var(--uz-line);
  --border: var(--uz-line);
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: var(--uz-shadow);
  --shadow-sm: var(--uz-shadow-soft);
  --shadow-md: var(--uz-shadow);
  --shadow-lg: 0 8px 24px rgba(17, 23, 19, .08);
}

body.uz-modern-page {
  min-width: 0 !important;
  background: var(--uz-bg) !important;
  color: var(--uz-ink) !important;
  letter-spacing: 0 !important;
}

body.uz-modern-page::before {
  content: none !important;
}

body.uz-modern-page *,
body.uz-modern-page *::before,
body.uz-modern-page *::after {
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
}

body.uz-modern-page :is(.container, .wrap, .wrapper, .page-shell, .app-container, main, .main, .content, .page) {
  max-width: 1440px !important;
  width: 100% !important;
  margin-inline: auto !important;
}

body.uz-modern-page :is(.header, .page-header, .dashboard-header, .brandbar, .topbar, .toolbar):not(.uz-global-topbar) {
  background: var(--uz-surface) !important;
  color: var(--uz-ink) !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: var(--uz-radius) !important;
  box-shadow: var(--uz-shadow) !important;
}

body.uz-modern-page :is(.card, .panel, .box, .widget, .section, .section-card, .glass-card, .dashboard-card, .summary-card, .stat-card, .kpi-card, .metric-card, .module-card, .form-card, .filter-section, .summary-section, .chart-card, .tab-panel, .bip-section, .ei-section, .ei-card, .bip-kpi, .ei-kpi, .lote-card, .lote-item, .central-card, .input-section, .muted-box) {
  background: var(--uz-surface) !important;
  color: var(--uz-ink) !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: var(--uz-radius) !important;
  box-shadow: var(--uz-shadow) !important;
}

body.uz-modern-page :is(.central-card, .card-header, .sidebar, .btn-primary, .primary, button[type="submit"], .tab.active, .tab-btn.active, .tab-main.active, .mega-tab.active) {
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
  color: #ffffff !important;
}

body.uz-modern-page :is(.card, .panel, .section, .kpi-card, .metric-card, .stat-card, .module-card, .form-card):hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(17, 23, 19, .07) !important;
}

body.uz-modern-page :is(h1, h2, h3, h4, .title, .page-title, .section-title, .card-title, .panel-title, .summary-title, .metric-title) {
  color: var(--uz-ink) !important;
  letter-spacing: 0 !important;
}

body.uz-modern-page :is(.central-card h1, .central-card h2, .card-header h1, .card-header h2, .btn-primary, .primary, .tab.active, .tab-btn.active, .tab-main.active) {
  color: #ffffff !important;
}

body.uz-modern-page :is(p, small, label, .muted, .subtitle, .description, .help, .hint, .user-info, .sub-header, .page-header-sub) {
  color: var(--uz-muted) !important;
}

body.uz-modern-page :is(input, select, textarea, .input) {
  min-height: 38px !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--uz-ink) !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(input, select, textarea, .input):focus {
  border-color: var(--uz-accent) !important;
  box-shadow: 0 0 0 3px var(--uz-ring) !important;
  outline: 0 !important;
}

body.uz-modern-page :is(button, .btn, [role="button"], input[type="button"], input[type="submit"], .btn-header, .tab, .tab-btn, .tab-main, .tab-sub, .mega-tab, .chip, .badge) {
  border-radius: 6px !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  min-width: 0 !important;
}

body.uz-modern-page :is(button, .btn, [role="button"], input[type="button"], input[type="submit"]):not(.uz-global-toggle):not(.uz-global-rail-toggle):not(.uz-sidebar-toggle):not(.uz-global-fav-toggle) {
  min-height: 36px !important;
  white-space: normal !important;
}

body.uz-modern-page :is(.btn-secondary, .secondary, .btn-ghost, .ghost, .chip) {
  background: #ffffff !important;
  border: 1px solid var(--uz-line) !important;
  color: var(--uz-ink) !important;
}

body.uz-modern-page :is(.danger, .btn-danger, .delete, .remove, .bg-red-600) {
  background: #b42318 !important;
  border-color: #b42318 !important;
  color: #ffffff !important;
}

body.uz-modern-page :is(.tabs, .bip-tabs, .tab-list, .nav-tabs, .tabs-main, .tabs-sub, .mega-tabs-container, .tab-row) {
  background: var(--uz-surface) !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: var(--uz-radius) !important;
  box-shadow: none !important;
  gap: 6px !important;
}

body.uz-modern-page :is(.tab, .bip-tab, [role="tab"], .tab-btn, .tab-main, .tab-sub, .mega-tab) {
  background: var(--uz-surface-2) !important;
  border: 1px solid transparent !important;
  color: var(--uz-muted) !important;
}

body.uz-modern-page :is(.tab.active, .tab.is-active, .tab[aria-selected="true"], .bip-tab.active, .bip-tab[aria-selected="true"], [role="tab"][aria-selected="true"], .tab-btn.active, .tab-main.active, .tab-sub.active, .mega-tab.active) {
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
  color: #ffffff !important;
}

body.uz-modern-page :is(.table-wrap, .table-container, .report-table-wrapper) {
  border: 1px solid var(--uz-line) !important;
  border-radius: var(--uz-radius) !important;
  overflow-x: auto !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(table, .report-table, .bip-table, .data-table) {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: var(--uz-radius) !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(thead, .report-table thead, .bip-table thead),
body.uz-modern-page :is(th, .report-table th, .bip-table th) {
  background: var(--uz-surface-2) !important;
}

body.uz-modern-page :is(th, .report-table th, .bip-table th) {
  color: var(--uz-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

body.uz-modern-page :is(td, th, .report-table td, .report-table th, .bip-table td, .bip-table th) {
  border-color: var(--uz-line-2) !important;
  vertical-align: middle !important;
}

body.uz-modern-page :is(tbody tr:hover td, tr:hover td) {
  background: var(--uz-surface-2) !important;
}

body.uz-modern-page :is(.badge, .chip, .status, [class*="badge-"], [class*="status-"]) {
  border-radius: 999px !important;
  font-weight: 800 !important;
}

body.uz-modern-page :is(.empty, .empty-state, .uz-global-empty, [class*="empty"]) {
  color: var(--uz-muted) !important;
  background: var(--uz-surface-2) !important;
  border: 1px dashed var(--uz-line) !important;
  border-radius: var(--uz-radius) !important;
}

body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart) {
  background: #ffffff !important;
  border-color: var(--uz-line) !important;
}

body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart)::after {
  content: none !important;
}

.uz-global-topbar {
  height: 58px !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--uz-line) !important;
  box-shadow: var(--uz-shadow) !important;
  backdrop-filter: none !important;
}

body.uz-global-enabled {
  padding-top: 58px !important;
}

.uz-global-shell,
.uz-sidebar {
  background: #ffffff !important;
  border-right: 1px solid var(--uz-line) !important;
  box-shadow: 6px 0 18px rgba(17, 23, 19, .08) !important;
}

.uz-global-link,
.uz-side-link {
  min-height: 40px !important;
  border-radius: 6px !important;
}

.uz-global-link.is-active,
.uz-side-link.is-active {
  background: var(--uz-accent-soft) !important;
  color: var(--uz-accent-dark) !important;
  border-color: rgba(31, 122, 58, .28) !important;
}

.uz-global-icon,
.uz-side-icon {
  border-radius: 6px !important;
  background: var(--uz-surface-2) !important;
  color: var(--uz-accent-dark) !important;
}

.uz-global-page-title,
.uz-global-page-kicker,
.uz-global-status,
.uz-global-title,
.uz-global-kicker,
.uz-global-section-title {
  letter-spacing: 0 !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle {
  border-radius: 0 8px 8px 0 !important;
  background: #ffffff !important;
  color: var(--uz-accent-dark) !important;
  border-color: var(--uz-line) !important;
}

.uz-route-progress span {
  background: var(--uz-accent) !important;
}

@media (max-width: 720px) {
  body.uz-modern-page :is(.container, .wrap, .wrapper, .page-shell, .app-container, main, .main, .content, .page) {
    padding-inline: 12px !important;
  }

  body.uz-modern-page :is(.header, .page-header, .dashboard-header, .brandbar, .topbar, .toolbar):not(.uz-global-topbar) {
    align-items: start !important;
    gap: 10px !important;
  }

  body.uz-modern-page :is(.tabs, .bip-tabs, .tab-list, .nav-tabs, .tabs-main, .tabs-sub, .mega-tabs-container, .tab-row) {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
  }
}

/* ===== Absolute sidebar arrow lock REAL EOF 2026-05-07-09 ===== */
:root {
  --uz-sidebar-handle-width: 42px;
  --uz-sidebar-handle-height: 72px;
  --uz-sidebar-width-fixed: 320px;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle,
.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active,
body.uz-modern-page .uz-global-rail-toggle,
body.uz-modern-page .uz-sidebar-toggle,
body.uz-modern-page .uz-global-rail-toggle:hover,
body.uz-modern-page .uz-global-rail-toggle:focus,
body.uz-modern-page .uz-global-rail-toggle:active,
body.uz-modern-page .uz-sidebar-toggle:hover,
body.uz-modern-page .uz-sidebar-toggle:focus,
body.uz-modern-page .uz-sidebar-toggle:active {
  position: fixed !important;
  top: calc(50vh - 36px) !important;
  bottom: auto !important;
  left: 0 !important;
  right: auto !important;
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  rotate: none !important;
  border-radius: 0 14px 14px 0 !important;
  line-height: 1 !important;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  z-index: 2147483000 !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle,
body.uz-global-open .uz-global-rail-toggle:hover,
body.uz-global-open .uz-global-rail-toggle:focus,
body.uz-global-open .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  top: calc(50vh - 36px) !important;
  left: min(calc(100vw - 42px), 320px) !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
}

.uz-global-rail-toggle::before,
.uz-sidebar-toggle::before {
  content: none !important;
}

.uz-global-rail-toggle svg,
.uz-sidebar-toggle svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  flex: none !important;
  margin: 0 !important;
  pointer-events: none !important;
}

/* ===== Absolute sidebar arrow lock EOF 2026-05-07-09 ===== */
:root {
  --uz-sidebar-handle-width: 42px;
  --uz-sidebar-handle-height: 72px;
  --uz-sidebar-width-fixed: 320px;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle,
.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active,
body.uz-modern-page .uz-global-rail-toggle,
body.uz-modern-page .uz-sidebar-toggle,
body.uz-modern-page .uz-global-rail-toggle:hover,
body.uz-modern-page .uz-global-rail-toggle:focus,
body.uz-modern-page .uz-global-rail-toggle:active,
body.uz-modern-page .uz-sidebar-toggle:hover,
body.uz-modern-page .uz-sidebar-toggle:focus,
body.uz-modern-page .uz-sidebar-toggle:active {
  position: fixed !important;
  top: calc(50vh - (var(--uz-sidebar-handle-height) / 2)) !important;
  bottom: auto !important;
  left: 0 !important;
  right: auto !important;
  display: grid !important;
  place-items: center !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  height: var(--uz-sidebar-handle-height) !important;
  min-height: var(--uz-sidebar-handle-height) !important;
  max-height: var(--uz-sidebar-handle-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  rotate: none !important;
  border-radius: 0 14px 14px 0 !important;
  line-height: 1 !important;
  vertical-align: baseline !important;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  z-index: 2147483000 !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle,
body.uz-global-open .uz-global-rail-toggle:hover,
body.uz-global-open .uz-global-rail-toggle:focus,
body.uz-global-open .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  top: calc(50vh - (var(--uz-sidebar-handle-height) / 2)) !important;
  left: min(calc(100vw - var(--uz-sidebar-handle-width)), var(--uz-sidebar-width-fixed)) !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
}

.uz-global-rail-toggle::before,
.uz-sidebar-toggle::before {
  content: none !important;
}

.uz-global-rail-toggle svg,
.uz-sidebar-toggle svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  flex: none !important;
  margin: 0 !important;
  transform-origin: 50% 50% !important;
  pointer-events: none !important;
}

/* ===== Unified top header 2026-05-07-07 ===== */
body.uz-global-enabled {
  padding-top: 64px !important;
}

.uz-global-topbar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  height: 64px !important;
  z-index: 2147482500 !important;
  border-bottom: 1px solid var(--uz-line) !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--uz-ink) !important;
  box-shadow: 0 12px 34px rgba(16, 30, 20, .08) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
}

body.uz-global-open .uz-global-topbar {
  left: 0 !important;
}

.uz-global-page-kicker {
  color: var(--uz-muted) !important;
  font-family: var(--uz-font-mono) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.uz-global-page-title {
  color: var(--uz-ink) !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

.uz-global-toggle,
.uz-global-mini-mark {
  border-radius: 0 !important;
  border: 1px solid var(--uz-line) !important;
  background: #fff !important;
  color: var(--uz-accent-dark) !important;
  box-shadow: none !important;
}

body.uz-global-enabled > header:not(.uz-global-topbar),
body.uz-global-enabled > .brandbar,
body.uz-global-enabled > .topbar,
body.uz-global-enabled > .navbar,
body.uz-global-enabled > .toolbar,
body.uz-global-enabled > .header,
body.uz-global-enabled > .page-header,
body.uz-global-enabled > .main-header,
body.uz-global-enabled main > .brandbar:first-child,
body.uz-global-enabled main > .topbar:first-child,
body.uz-global-enabled main > .navbar:first-child,
body.uz-global-enabled main > .toolbar:first-child,
body.uz-global-enabled main > .header:first-child,
body.uz-global-enabled main > .page-header:first-child,
body.uz-global-enabled .container > .brandbar:first-child,
body.uz-global-enabled .container > .topbar:first-child,
body.uz-global-enabled .container > .navbar:first-child,
body.uz-global-enabled .container > .toolbar:first-child,
body.uz-global-enabled .container > .header:first-child,
body.uz-global-enabled .container > .page-header:first-child,
body.uz-global-enabled .app > .header:first-child,
body.uz-global-enabled .app > .page-header:first-child,
body.uz-global-enabled .app-container > .header:first-child,
body.uz-global-enabled .app-container > .dashboard-header:first-child,
body.uz-global-enabled .uz-app-shell > .header:first-child {
  display: none !important;
}

body.uz-global-enabled .brandbar.sticky,
body.uz-global-enabled header.brandbar.sticky,
body.uz-global-enabled header.topbar,
body.uz-global-enabled .topbar {
  position: static !important;
  display: none !important;
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 60px !important;
  }

  .uz-global-topbar {
    height: 60px !important;
  }
}

/* ===== Fixed sidebar handle + topbar-only shell 2026-05-07-05 ===== */
.uz-global-rail-toggle,
.uz-sidebar-toggle {
  left: 0 !important;
  right: auto !important;
  top: 50% !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 66px !important;
  min-height: 66px !important;
  max-height: 66px !important;
  margin: 0 !important;
  transform: translateY(-50%) !important;
  translate: none !important;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  will-change: auto !important;
}

.uz-global-rail-toggle:hover,
.uz-sidebar-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-sidebar-toggle:focus,
body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle {
  left: 0 !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  transform: translateY(-50%) !important;
  translate: none !important;
}

.uz-global-rail-toggle::before,
.uz-sidebar-toggle::before {
  content: "";
  position: absolute;
  inset: -12px -12px -12px 0;
}

.uz-global-rail-toggle svg,
.uz-sidebar-toggle svg {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.uz-global-topbar-only {
  left: 0 !important;
  width: 100% !important;
}

.uz-global-mini-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--uz-line);
  background: #fff;
  color: var(--uz-accent-dark);
  font-family: var(--uz-font-mono);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

body.uz-global-topbar-only-page {
  padding-left: 0 !important;
}

.uz-global-link,
.uz-side-link {
  min-height: 44px !important;
  padding: 7px 10px !important;
  border-radius: 0 !important;
  color: #3d5a48 !important;
}

.uz-global-link::before,
.uz-side-link::before {
  inset: 8px auto 8px 0 !important;
  width: 3px !important;
}

.uz-global-link:hover,
.uz-side-link:hover,
.uz-global-link.is-active,
.uz-side-link.is-active {
  border-color: var(--uz-line) !important;
  background: var(--uz-surface-2) !important;
  color: var(--uz-ink) !important;
  box-shadow: none !important;
}

.uz-global-link.is-active,
.uz-side-link.is-active {
  border-left-color: var(--uz-accent) !important;
  box-shadow: inset 3px 0 0 var(--uz-accent) !important;
}

.uz-global-icon,
.uz-side-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--uz-ink-2) !important;
}

.uz-global-link:hover .uz-global-icon,
.uz-side-link:hover .uz-side-icon,
.uz-global-link.is-active .uz-global-icon,
.uz-side-link.is-active .uz-side-icon {
  background: #fff !important;
  color: var(--uz-accent-dark) !important;
  border-color: var(--uz-accent) !important;
}

.uz-side-title,
.uz-global-link > span:last-child {
  font-size: 12px !important;
  font-weight: 950 !important;
}

.uz-side-help {
  font-size: 10px !important;
  color: var(--uz-muted) !important;
}

.uz-global-fav-toggle {
  border-radius: 0 !important;
  background: #fff !important;
}

.uz-global-fav-toggle.is-favorite {
  background: var(--uz-surface-2) !important;
}

body.uz-modern-page :is(.container, main, .main, .content, .page, .wrap, .wrapper) {
  max-width: min(1520px, calc(100vw - 32px)) !important;
}

body.uz-modern-page :is(.header, header.header, .page-header, .topbar, .toolbar):not(.uz-global-topbar) {
  border-radius: 0 !important;
  border-color: var(--uz-line) !important;
  box-shadow: none !important;
  background: rgba(255,255,255,.98) !important;
}

body.uz-modern-page :is(.card, .panel, .box, .widget, .section, .section-card, .glass-card, .dashboard-card, .summary-card, .stat-card, .kpi-card, .metric-card, .module-card, .form-card, .filter-section, .summary-section, .chart-card, .tab-panel, .bip-section, .ei-section, .ei-card, .bip-kpi, .ei-kpi, .lote-item) {
  border-radius: 0 !important;
  border-color: var(--uz-line) !important;
  background: rgba(255,255,255,.98) !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(.card, .panel, .box, .widget, .section, .section-card, .glass-card, .dashboard-card, .summary-card, .stat-card, .kpi-card, .metric-card, .module-card, .form-card, .filter-section, .summary-section, .chart-card, .tab-panel, .bip-section, .ei-section, .ei-card, .bip-kpi, .ei-kpi, .lote-item):hover {
  border-color: #bfcbbd !important;
}

body.uz-modern-page :is(.kpi-card, .metric-card, .stat-card, .bip-kpi, .ei-kpi) {
  position: relative;
  overflow: hidden;
}

body.uz-modern-page :is(.kpi-card, .metric-card, .stat-card, .bip-kpi, .ei-kpi)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--uz-accent);
  opacity: .72;
}

body.uz-modern-page :is(input, select, textarea) {
  border-radius: 0 !important;
  background: #fff !important;
}

body.uz-modern-page :is(input, select, textarea):focus {
  border-color: var(--uz-accent) !important;
  box-shadow: 0 0 0 3px var(--uz-ring) !important;
}

body.uz-modern-page :is(button, .btn, [role="button"], input[type="button"], input[type="submit"]) {
  border-radius: 0 !important;
  letter-spacing: 0 !important;
}

body.uz-modern-page :is(button, .btn, [role="button"], input[type="button"], input[type="submit"]):hover {
  transform: none !important;
}

body.uz-modern-page :is(.btn-primary, .primary, button[type="submit"], .bg-blue-600, .bg-indigo-600, .ei-btn, .bip-btn) {
  background: var(--uz-accent-dark) !important;
  border-color: var(--uz-accent-dark) !important;
  color: #fff !important;
}

body.uz-modern-page :is(.btn-primary, .primary, button[type="submit"], .bg-blue-600, .bg-indigo-600, .ei-btn, .bip-btn):hover {
  background: var(--uz-accent) !important;
  border-color: var(--uz-accent) !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(.btn-secondary, .secondary, .btn-ghost, .ghost) {
  background: #fff !important;
  border-color: var(--uz-line) !important;
  color: var(--uz-ink-2) !important;
}

body.uz-modern-page :is(table, .report-table, .bip-table, .data-table) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(thead, .report-table thead, .bip-table thead),
body.uz-modern-page :is(th, .report-table th, .bip-table th) {
  background: var(--uz-surface-2) !important;
}

body.uz-modern-page :is(th, .report-table th, .bip-table th) {
  color: var(--uz-ink-2) !important;
  font-size: 10px !important;
  letter-spacing: .08em !important;
}

body.uz-modern-page :is(.tabs, .bip-tabs, .tab-list, .nav-tabs) {
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

body.uz-modern-page :is(.tab, .bip-tab, [role="tab"]) {
  border-radius: 0 !important;
}

body.uz-modern-page :is(.tab.active, .tab.is-active, .tab[aria-selected="true"], .bip-tab.active, .bip-tab[aria-selected="true"], [role="tab"][aria-selected="true"]) {
  background: var(--uz-surface-2) !important;
  color: var(--uz-ink) !important;
  border-color: var(--uz-line) !important;
  box-shadow: inset 0 -3px 0 var(--uz-accent) !important;
}

.uz-toast,
.uz-loading-card,
.uz-dialog,
body.uz-modern-page :is(.modal, .dialog, .popup, .swal2-popup, .chart-modal-content) {
  border-radius: 0 !important;
  border-color: var(--uz-line) !important;
  box-shadow: 0 18px 48px rgba(15, 36, 20, .16) !important;
}

.uz-dialog-head,
.uz-dialog-actions {
  background: var(--uz-surface-2) !important;
}

.uz-dialog-close,
.uz-toast-close,
.uz-dialog-confirm,
.uz-dialog-cancel {
  border-radius: 0 !important;
}

.uz-route-progress span {
  background: var(--uz-accent-dark) !important;
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 58px !important;
  }

  .uz-global-topbar {
    height: 58px !important;
  }
}

/* ===== Final shell layering authority 2026-05-11 ===== */
body.uz-global-enabled .uz-global-topbar {
  z-index: 2147481000 !important;
}

body.uz-global-enabled .uz-global-shell,
body.uz-sidebar-open .uz-sidebar,
body:not(.uz-sidebar-open) .uz-sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  width: var(--uz-sidebar-width-fixed, 320px) !important;
  max-width: calc(100vw - var(--uz-sidebar-handle-width, 42px)) !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: 2147483200 !important;
}

body.uz-global-enabled:not(.uz-global-open) .uz-global-shell,
body:not(.uz-sidebar-open) .uz-sidebar {
  transform: translate3d(-100%, 0, 0) !important;
}

body.uz-global-enabled.uz-global-open .uz-global-shell,
body.uz-sidebar-open .uz-sidebar {
  transform: translate3d(0, 0, 0) !important;
}

body.uz-global-enabled.uz-global-open .uz-global-topbar,
body.uz-sidebar-open .uz-global-topbar {
  pointer-events: none !important;
}

body.uz-global-enabled .uz-global-rail-toggle,
body.uz-global-enabled .uz-global-rail-toggle:hover,
body.uz-global-enabled .uz-global-rail-toggle:focus,
body.uz-global-enabled .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle,
body:not(.uz-sidebar-open) .uz-sidebar-toggle,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  z-index: 2147483400 !important;
}

/* ===== Sidebar above header fix 2026-05-11 ===== */
:root {
  --uz-shell-layer: 2147483200;
  --uz-shell-handle-layer: 2147483300;
  --uz-shell-header-layer: 2147482500;
}

.uz-global-topbar {
  z-index: var(--uz-shell-header-layer) !important;
}

.uz-global-shell,
.uz-sidebar {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: var(--uz-shell-layer) !important;
}

body.uz-global-open .uz-global-shell,
body.uz-sidebar-open .uz-sidebar {
  z-index: var(--uz-shell-layer) !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle,
.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active {
  z-index: var(--uz-shell-handle-layer) !important;
}

body.uz-global-enabled :is(header, .header, .topbar, .navbar, .brandbar, .toolbar):not(.uz-global-topbar):not(.uz-global-shell *):not(.uz-sidebar *) {
  z-index: calc(var(--uz-shell-header-layer) - 10) !important;
}

/* ===== Charts, popups and loading unified polish 2026-05-07-03 ===== */
body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart, [class*="chart"], [id*="chart"], [id*="Chart"]) {
  border-color: var(--uz-line) !important;
}

body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart) {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,247,240,.55)) !important;
}

body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart)::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--uz-accent-dark), var(--uz-accent), transparent);
  opacity: .55;
  pointer-events: none;
}

body.uz-modern-page canvas {
  max-width: 100%;
}

body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart) canvas {
  background: #fff;
  border: 1px solid var(--uz-line-2);
}

body.uz-modern-page :is(canvas[id*="chart"], canvas[id*="Chart"], canvas[id*="grafico"], canvas[id*="Grafico"]) {
  border-radius: 0 !important;
}

body.uz-modern-page :is(.chart-card h3, .chart-card h4, .chart-title, .grafico-title, [class*="chart-title"]) {
  color: var(--uz-ink) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

body.uz-modern-page :is(.chart-card .subtitle, .chart-subtitle, .grafico-subtitle, [class*="chart-subtitle"]) {
  color: var(--uz-muted) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

body.uz-modern-page :is(.chart-modal, .chart-modal-content, .modal-chart, .modal-content, [id*="modal"][style*="fixed"], [id*="Modal"][style*="fixed"]) {
  backdrop-filter: blur(14px) saturate(130%) !important;
}

body.uz-modern-page :is(.modal, .dialog, .popup, .swal2-popup, .chart-modal-content, [class*="modal-content"], [class*="ModalContent"]) {
  background: rgba(255,255,255,.98) !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 0 !important;
  box-shadow: 0 22px 60px rgba(15, 36, 20, .18) !important;
}

body.uz-modern-page :is(.modal-header, .dialog-header, .popup-header, .chart-modal-header, .swal2-title) {
  color: var(--uz-ink) !important;
  border-color: var(--uz-line) !important;
  font-weight: 950 !important;
}

body.uz-modern-page :is(.modal-footer, .dialog-footer, .popup-footer) {
  border-color: var(--uz-line) !important;
  background: var(--uz-surface-2) !important;
}

body.uz-modern-page :is(.swal2-confirm, .swal2-deny) {
  background: var(--uz-accent-dark) !important;
  border-radius: 0 !important;
  color: #fff !important;
}

body.uz-modern-page :is(.swal2-cancel) {
  background: #fff !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 0 !important;
  color: var(--uz-ink-2) !important;
}

body.uz-modern-page :is(.loading, .loader, .loading-overlay, .spinner-container, [class*="loading"], [id*="loading"], [id*="Loading"]) {
  color: var(--uz-accent-dark) !important;
}

body.uz-modern-page :is(.skeleton, [class*="skeleton"]) {
  background: linear-gradient(90deg, #eef2eb, #fbfcf8, #eef2eb) !important;
  background-size: 220% 100% !important;
  animation: uzSkeleton 1.1s ease-in-out infinite !important;
}

.uz-loading-card {
  min-height: 170px;
}

.uz-spinner {
  width: 34px !important;
  height: 34px !important;
  border-color: #e8ece7 !important;
  border-top-color: var(--uz-accent-dark) !important;
}

.uz-toast {
  border-left: 3px solid var(--uz-accent) !important;
}

.uz-toast-success { border-left-color: var(--uz-success) !important; }
.uz-toast-error { border-left-color: var(--uz-danger) !important; }
.uz-toast-warning { border-left-color: var(--uz-warning) !important; }

@keyframes uzSkeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* ===== Sidebar handle and search refinements 2026-05-07-04 ===== */
.uz-global-rail-toggle,
.uz-sidebar-toggle {
  left: 0 !important;
  width: 30px !important;
  height: 64px !important;
  transition: background .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease !important;
}

.uz-global-rail-toggle:hover,
.uz-sidebar-toggle:hover {
  width: 30px !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle {
  left: 0 !important;
}

.uz-global-search {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--uz-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.uz-global-search svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 auto !important;
  color: var(--uz-muted) !important;
}

body.uz-modern-page .uz-global-search-input,
.uz-global-search-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--uz-ink) !important;
}

body.uz-modern-page .uz-global-search-input:focus,
.uz-global-search-input:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.uz-global-search:focus-within {
  border-color: var(--uz-accent) !important;
  box-shadow: 0 0 0 3px var(--uz-ring) !important;
}

/* ===== Final sidebar handle lock 2026-05-07-06 ===== */
:root {
  --uz-sidebar-width-fixed: 320px;
  --uz-sidebar-handle-width: 42px;
  --uz-sidebar-handle-height: 72px;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle {
  position: fixed !important;
  top: 50% !important;
  left: 0 !important;
  right: auto !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  height: var(--uz-sidebar-handle-height) !important;
  min-height: var(--uz-sidebar-handle-height) !important;
  max-height: var(--uz-sidebar-handle-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
  border-radius: 0 14px 14px 0 !important;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  z-index: 2147483000 !important;
  overflow: visible !important;
}

.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active {
  top: 50% !important;
  left: 0 !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  height: var(--uz-sidebar-handle-height) !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle {
  left: min(calc(100vw - var(--uz-sidebar-handle-width)), var(--uz-sidebar-width-fixed)) !important;
  right: auto !important;
  border-radius: 0 14px 14px 0 !important;
  transform: translate3d(0, -50%, 0) !important;
  translate: none !important;
}

body.uz-global-open .uz-global-rail-toggle:hover,
body.uz-global-open .uz-global-rail-toggle:focus,
body.uz-global-open .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  left: min(calc(100vw - var(--uz-sidebar-handle-width)), var(--uz-sidebar-width-fixed)) !important;
  width: var(--uz-sidebar-handle-width) !important;
  min-width: var(--uz-sidebar-handle-width) !important;
  max-width: var(--uz-sidebar-handle-width) !important;
  transform: translate3d(0, -50%, 0) !important;
}

.uz-global-rail-toggle::before,
.uz-sidebar-toggle::before {
  content: "";
  position: absolute;
  inset: -14px -14px -14px 0;
  pointer-events: auto;
}

.uz-global-rail-toggle svg,
.uz-sidebar-toggle svg {
  position: relative !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
/* ===== Final global header + handle authority EOF 2026-05-07-07 ===== */
body.uz-global-enabled {
  padding-top: 64px !important;
}

.uz-global-topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 64px !important;
  z-index: 2147482500 !important;
  border-bottom: 1px solid var(--uz-line) !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--uz-ink) !important;
  box-shadow: 0 12px 34px rgba(16, 30, 20, .08) !important;
  backdrop-filter: blur(18px) saturate(145%) !important;
}

body.uz-global-open .uz-global-topbar,
.uz-global-topbar-only {
  left: 0 !important;
  width: 100% !important;
}

body.uz-global-enabled > header:not(.uz-global-topbar),
body.uz-global-enabled > .brandbar,
body.uz-global-enabled > .topbar,
body.uz-global-enabled > .navbar,
body.uz-global-enabled > .toolbar,
body.uz-global-enabled > .header,
body.uz-global-enabled > .page-header,
body.uz-global-enabled > .main-header,
body.uz-global-enabled main > .brandbar:first-child,
body.uz-global-enabled main > .topbar:first-child,
body.uz-global-enabled main > .navbar:first-child,
body.uz-global-enabled main > .toolbar:first-child,
body.uz-global-enabled main > .header:first-child,
body.uz-global-enabled main > .page-header:first-child,
body.uz-global-enabled .container > .brandbar:first-child,
body.uz-global-enabled .container > .topbar:first-child,
body.uz-global-enabled .container > .navbar:first-child,
body.uz-global-enabled .container > .toolbar:first-child,
body.uz-global-enabled .container > .header:first-child,
body.uz-global-enabled .container > .page-header:first-child,
body.uz-global-enabled .app > .header:first-child,
body.uz-global-enabled .app > .page-header:first-child,
body.uz-global-enabled .app-container > .header:first-child,
body.uz-global-enabled .app-container > .dashboard-header:first-child,
body.uz-global-enabled .uz-app-shell > .header:first-child,
body.uz-global-enabled .uz-app-shell .header:not(.lote-header):first-child,
body.uz-global-enabled .brandbar.sticky,
body.uz-global-enabled header.brandbar.sticky,
body.uz-global-enabled header.topbar,
body.uz-global-enabled .topbar {
  display: none !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle,
.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active {
  position: fixed !important;
  top: calc(50vh - 36px) !important;
  bottom: auto !important;
  left: 0 !important;
  right: auto !important;
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  rotate: none !important;
  border-radius: 0 14px 14px 0 !important;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease !important;
  z-index: 2147483000 !important;
}

body.uz-global-open .uz-global-rail-toggle,
body.uz-sidebar-open .uz-sidebar-toggle,
body.uz-global-open .uz-global-rail-toggle:hover,
body.uz-global-open .uz-global-rail-toggle:focus,
body.uz-global-open .uz-global-rail-toggle:active,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  top: calc(50vh - 36px) !important;
  left: min(calc(100vw - 42px), 320px) !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
}

.uz-global-rail-toggle::before,
.uz-sidebar-toggle::before {
  content: none !important;
}

.uz-global-rail-toggle svg,
.uz-sidebar-toggle svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  flex: none !important;
  margin: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 60px !important;
  }

  .uz-global-topbar {
    height: 60px !important;
  }
}

/* ===== Tenant modules EOF authority 2026-05-10 ===== */
body.uz-modern-page {
  background: var(--uz-bg) !important;
}

body.uz-modern-page::before,
body.uz-modern-page :is(.chart-card, .chart-container, .chart-wrapper, .chart-box, .grafico-card, .grafico-container, .bip-chart, .ei-chart)::after {
  content: none !important;
}

.uz-global-topbar {
  height: 58px !important;
  background: #ffffff !important;
  box-shadow: var(--uz-shadow) !important;
  backdrop-filter: none !important;
}

body.uz-global-enabled {
  padding-top: 58px !important;
}

.uz-global-rail-toggle,
.uz-sidebar-toggle,
.uz-global-rail-toggle:hover,
.uz-global-rail-toggle:focus,
.uz-global-rail-toggle:active,
.uz-sidebar-toggle:hover,
.uz-sidebar-toggle:focus,
.uz-sidebar-toggle:active {
  border-radius: 0 8px 8px 0 !important;
  background: #ffffff !important;
  color: var(--uz-accent-dark) !important;
  border-color: var(--uz-line) !important;
}

@media (max-width: 720px) {
  body.uz-global-enabled {
    padding-top: 58px !important;
  }

  .uz-global-topbar {
    height: 58px !important;
  }
}

/* ===== Absolute final shell layering authority 2026-05-11 ===== */
body.uz-global-enabled .uz-global-topbar {
  z-index: 2147481000 !important;
}

body.uz-global-enabled .uz-global-shell,
body.uz-global-enabled.uz-global-open .uz-global-shell,
body:not(.uz-sidebar-open) .uz-sidebar,
body.uz-sidebar-open .uz-sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  width: var(--uz-sidebar-width-fixed, 320px) !important;
  max-width: calc(100vw - var(--uz-sidebar-handle-width, 42px)) !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: 2147483200 !important;
}

body.uz-global-enabled:not(.uz-global-open) .uz-global-shell,
body:not(.uz-sidebar-open) .uz-sidebar {
  transform: translate3d(-100%, 0, 0) !important;
}

body.uz-global-enabled.uz-global-open .uz-global-shell,
body.uz-sidebar-open .uz-sidebar {
  transform: translate3d(0, 0, 0) !important;
}

body.uz-global-enabled.uz-global-open .uz-global-topbar,
body.uz-sidebar-open .uz-global-topbar {
  pointer-events: none !important;
}

body.uz-global-enabled .uz-global-rail-toggle,
body.uz-global-enabled .uz-global-rail-toggle:hover,
body.uz-global-enabled .uz-global-rail-toggle:focus,
body.uz-global-enabled .uz-global-rail-toggle:active,
body:not(.uz-sidebar-open) .uz-sidebar-toggle,
body.uz-sidebar-open .uz-sidebar-toggle,
body.uz-sidebar-open .uz-sidebar-toggle:hover,
body.uz-sidebar-open .uz-sidebar-toggle:focus,
body.uz-sidebar-open .uz-sidebar-toggle:active {
  z-index: 2147483400 !important;
}
