/* Local-only visual override for mastersheet-neural-local.html */

.theme-neural-local {
  --pri: #1f6feb;
  --pri-2: #70b8ff;
  --ok: #0f8f63;
  --warn: #c2780e;
  --err: #cf3658;
  --drop-core: rgba(255, 255, 255, 0.98);
  --drop-mid: rgba(255, 255, 255, 0.88);
  --drop-edge: rgba(154, 205, 255, 0.72);
  --drop-shadow: rgba(13, 41, 86, 0.22);
  --r: 10px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --mono: "Chakra Petch", "Consolas", monospace;
}

.theme-neural-local[data-theme="ocean"] { --pri: #1f6feb; --pri-2: #70b8ff; }
.theme-neural-local[data-theme="mint"] { --pri: #0f9d7a; --pri-2: #49d2ad; }
.theme-neural-local[data-theme="sunset"] { --pri: #d6672a; --pri-2: #f5ad3e; }
.theme-neural-local[data-theme="lavender"] { --pri: #7a5cff; --pri-2: #b396ff; }
.theme-neural-local[data-theme="coral"] { --pri: #d94a61; --pri-2: #ff8a76; }
.theme-neural-local[data-theme="emerald"] { --pri: #0e8f5b; --pri-2: #3ac787; }
.theme-neural-local[data-theme="slate"] { --pri: #4b67a8; --pri-2: #7c97d6; }
.theme-neural-local[data-theme="saffron"] { --pri: #c77a05; --pri-2: #f0b233; }
.theme-neural-local[data-theme="rose"] { --pri: #c2416f; --pri-2: #e988b5; }
.theme-neural-local[data-theme="indigo"] { --pri: #4b5bdc; --pri-2: #8192ff; }
.theme-neural-local[data-theme="aqua"] { --pri: #0b8da6; --pri-2: #53c7dd; }
.theme-neural-local[data-theme="cocoa"] { --pri: #8a5a34; --pri-2: #c79668; }
.theme-neural-local[data-theme="olive"] { --pri: #6f8b2c; --pri-2: #a6c85e; }
.theme-neural-local[data-theme="ruby"] { --pri: #b22f4d; --pri-2: #ec6f8f; }
.theme-neural-local[data-theme="steel"] { --pri: #2f6c87; --pri-2: #6fa5bc; }
.theme-neural-local[data-theme="graphite"] { --pri: #6e8fa8; --pri-2: #a6c5dc; }

.theme-neural-local[data-mode="light"] {
  --bg: #f2f7ff;
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.86);
  --text: #10233f;
  --muted: #526b8d;
  --border: rgba(36, 85, 170, 0.23);
  --row-alt: #f5f9ff;
  --input-bg: rgba(255, 255, 255, 0.95);
  --module-shadow: 0 10px 24px rgba(23, 67, 145, 0.14);
  --milk-1: rgba(255, 255, 255, 0.78);
  --milk-2: rgba(255, 255, 255, 0.58);
  --milk-3: rgba(255, 255, 255, 0.36);
  --splash-a: rgba(31, 111, 235, 0.12);
  --splash-b: rgba(112, 184, 255, 0.1);
  --drop-core: rgba(255, 255, 255, 1);
  --drop-mid: rgba(255, 255, 255, 0.94);
  --drop-edge: var(--pri-2);
  --drop-shadow: rgba(22, 60, 120, 0.25);
}

.theme-neural-local[data-mode="dark"] {
  --bg: #0f1726;
  --card: rgba(20, 33, 52, 0.6);
  --card-strong: rgba(26, 40, 63, 0.72);
  --text: #e6efff;
  --muted: #9bb0cf;
  --border: rgba(130, 160, 220, 0.28);
  --row-alt: rgba(255, 255, 255, 0.03);
  --input-bg: rgba(16, 24, 38, 0.75);
  --module-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  --milk-1: rgba(255, 255, 255, 0.18);
  --milk-2: rgba(255, 255, 255, 0.12);
  --milk-3: rgba(255, 255, 255, 0.08);
  --splash-a: rgba(31, 111, 235, 0.2);
  --splash-b: rgba(112, 184, 255, 0.18);
  --drop-core: rgba(255, 255, 255, 0.96);
  --drop-mid: rgba(255, 255, 255, 0.84);
  --drop-edge: rgba(204, 226, 255, 0.72);
  --drop-shadow: rgba(7, 18, 38, 0.45);
}

.theme-neural-local {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.theme-neural-local::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
  background:
    radial-gradient(50% 34% at 12% 12%, var(--milk-1), transparent 72%),
    radial-gradient(36% 26% at 86% 18%, var(--milk-2), transparent 74%),
    radial-gradient(42% 30% at 18% 84%, var(--splash-a), transparent 76%),
    radial-gradient(34% 25% at 82% 78%, var(--splash-b), transparent 74%),
    radial-gradient(20% 16% at 56% 36%, var(--milk-3), transparent 72%),
    var(--bg);
  animation: milkSplashShift 12s ease-in-out infinite alternate;
}

.theme-neural-local::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background:
    radial-gradient(circle at 16% 32%, var(--milk-2) 0 5px, transparent 7px),
    radial-gradient(circle at 25% 74%, var(--milk-2) 0 4px, transparent 6px),
    radial-gradient(circle at 52% 42%, var(--milk-3) 0 4px, transparent 6px),
    radial-gradient(circle at 78% 24%, var(--milk-2) 0 5px, transparent 7px),
    radial-gradient(circle at 88% 70%, var(--milk-3) 0 4px, transparent 6px);
  animation: milkDropPulse 8s ease-in-out infinite;
}

@keyframes milkSplashShift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-1.2%, 0.8%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(1.4%, -0.9%, 0) scale(1.03);
  }
}

@keyframes milkDropPulse {
  0%, 100% { opacity: 0.42; transform: translateY(0); }
  50% { opacity: 0.72; transform: translateY(-0.6%); }
}

.theme-neural-local .milk-drop-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  opacity: 1;
}

.theme-neural-local .milk-splash-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.theme-neural-local .milk-splash {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 40% 38%, var(--milk-1), var(--milk-2) 52%, transparent 76%);
  filter: blur(1.4px);
  opacity: 0.86;
  animation: milkSplashFloat 14s ease-in-out infinite alternate;
}

.theme-neural-local .milk-splash.s1 {
  width: 320px;
  height: 220px;
  top: -34px;
  left: -52px;
  animation-delay: -2.2s;
}

.theme-neural-local .milk-splash.s2 {
  width: 260px;
  height: 180px;
  top: 14%;
  right: -38px;
  animation-delay: -7.3s;
}

.theme-neural-local .milk-splash.s3 {
  width: 340px;
  height: 220px;
  bottom: -54px;
  left: 18%;
  animation-delay: -4.8s;
}

.theme-neural-local .milk-splash.s4 {
  width: 290px;
  height: 190px;
  bottom: 8%;
  right: 12%;
  animation-delay: -9.1s;
}

@keyframes milkSplashFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.55; }
  50% { transform: translate3d(12px, -10px, 0) scale(1.05); opacity: 0.82; }
  100% { transform: translate3d(-10px, 8px, 0) scale(0.98); opacity: 0.64; }
}

.theme-neural-local .milk-drop {
  position: absolute;
  top: -16%;
  width: 22px;
  height: 40px;
  border-radius: 55% 55% 48% 48%;
  background:
    radial-gradient(circle at 36% 24%, var(--drop-core) 0 20%, transparent 48%),
    radial-gradient(circle at 58% 70%, var(--drop-edge) 0 46%, transparent 72%),
    linear-gradient(180deg, var(--drop-core) 0%, var(--drop-mid) 45%, var(--drop-edge) 100%);
  opacity: 0.88;
  filter: blur(0.06px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 12px 24px var(--drop-shadow);
  transform: translate3d(0, 0, 0) scale(1);
  animation: milkDropFall 10.4s cubic-bezier(.35, .1, .25, 1) infinite;
}

@keyframes milkDropFall {
  0% {
    transform: translate3d(var(--start-x, 0), -16vh, 0) scale(0.72);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  52% {
    transform: translate3d(calc(var(--start-x, 0) + (var(--drift-x, 12px) * 0.55)), 56vh, 0) scale(1);
    opacity: 0.86;
  }
  70% {
    opacity: 0.72;
  }
  100% {
    transform: translate3d(calc(var(--start-x, 0) + var(--drift-x, 12px)), 114vh, 0) scale(1.24);
    opacity: 0;
  }
}

.theme-neural-local .milk-drop.d1 { left: 6%; animation-delay: -1s; animation-duration: 8.8s; --drift-x: 18px; }
.theme-neural-local .milk-drop.d2 { left: 14%; animation-delay: -4.2s; animation-duration: 10.2s; --drift-x: -12px; }
.theme-neural-local .milk-drop.d3 { left: 22%; animation-delay: -2.4s; animation-duration: 11.4s; --drift-x: 16px; }
.theme-neural-local .milk-drop.d4 { left: 31%; animation-delay: -7.6s; animation-duration: 9.3s; width: 17px; height: 32px; --drift-x: -10px; }
.theme-neural-local .milk-drop.d5 { left: 40%; animation-delay: -3.1s; animation-duration: 10.7s; --drift-x: 19px; }
.theme-neural-local .milk-drop.d6 { left: 50%; animation-delay: -9.2s; animation-duration: 9.8s; width: 27px; height: 44px; --drift-x: -14px; }
.theme-neural-local .milk-drop.d7 { left: 58%; animation-delay: -5.3s; animation-duration: 11.8s; --drift-x: 14px; }
.theme-neural-local .milk-drop.d8 { left: 66%; animation-delay: -8.7s; animation-duration: 8.9s; width: 18px; height: 33px; --drift-x: -12px; }
.theme-neural-local .milk-drop.d9 { left: 74%; animation-delay: -2.8s; animation-duration: 11s; --drift-x: 17px; }
.theme-neural-local .milk-drop.d10 { left: 82%; animation-delay: -6.9s; animation-duration: 10.1s; --drift-x: -11px; }
.theme-neural-local .milk-drop.d11 { left: 90%; animation-delay: -1.7s; animation-duration: 11.9s; width: 17px; height: 31px; --drift-x: 13px; }
.theme-neural-local .milk-drop.d12 { left: 96%; animation-delay: -4.9s; animation-duration: 9.2s; width: 20px; height: 35px; --drift-x: -13px; }

.theme-neural-local[data-mode="dark"] .milk-drop {
  opacity: 0.92;
}

.theme-neural-local {
  overflow-x: hidden;
  overflow-y: auto;
}

body.eb-admin-theme.theme-neural-local {
  overflow-x: hidden;
  overflow-y: auto;
}

.theme-neural-local .app-shell {
  position: relative;
  z-index: 5;
  padding: 8px;
  gap: 8px;
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body.eb-admin-theme.theme-neural-local .app-shell > .app-header,
body.eb-admin-theme.theme-neural-local .app-shell > .tab-bar,
body.eb-admin-theme.theme-neural-local .app-shell > .kpi-hdr-bar,
body.eb-admin-theme.theme-neural-local .app-shell > .toolbar-v2,
body.eb-admin-theme.theme-neural-local .app-shell > .panel,
body.eb-admin-theme.theme-neural-local .C,
body.eb-admin-theme.theme-neural-local .modal,
body.eb-admin-theme.theme-neural-local .sb,
body.eb-admin-theme.theme-neural-local .ac {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--module-shadow) !important;
  backdrop-filter: blur(10px) saturate(120%);
}

.theme-neural-local .app-header,
.theme-neural-local .tab-bar,
.theme-neural-local .kpi-hdr-bar,
.theme-neural-local .toolbar-v2,
.theme-neural-local .panel.show,
.theme-neural-local .C,
.theme-neural-local .modal {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--module-shadow);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.theme-neural-local .toolbar-v2 {
  overflow: visible;
  z-index: 30;
}

.theme-neural-local .toolbar-v2 .t-row {
  overflow: visible;
}

.theme-neural-local .panel.show {
  z-index: 10;
  overflow: auto;
  min-height: 0;
}

.theme-neural-local .panel.show:not(#pGrid) {
  overflow: visible;
}

.theme-neural-local .app-header::before,
.theme-neural-local .tab-bar::before,
.theme-neural-local .kpi-hdr-bar::before,
.theme-neural-local .toolbar-v2::before,
.theme-neural-local .panel.show::before {
  display: none;
}

.theme-neural-local .app-header {
  border-radius: 14px;
  color: var(--text);
  height: 46px;
  background: linear-gradient(120deg, var(--card-strong), rgba(255, 255, 255, 0.05));
}

.theme-neural-local .app-header .logo {
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.theme-neural-local .app-header .logo span {
  color: var(--pri);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.theme-neural-local .header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-neural-local .header-actions #userInfo {
  color: var(--muted) !important;
  font-size: 9px !important;
}

.theme-neural-local .neural-theme-control {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
  height: 26px;
  padding: 0 8px;
}

.theme-neural-local #caaCheckChip {
  border-color: var(--border) !important;
  background: var(--card-strong) !important;
  color: var(--text) !important;
  font-size: 10px !important;
  padding: 4px 8px !important;
}

.theme-neural-local .header-actions button {
  background: linear-gradient(135deg, var(--pri), var(--pri-2));
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
  transition: transform 120ms ease, filter 120ms ease;
}

.theme-neural-local .header-actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.theme-neural-local #liveSyncState {
  font-size: 10px !important;
  font-weight: 700;
  color: #8fb8ff !important;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(9, 18, 36, 0.62);
}

.theme-neural-local .header-actions .nbell {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.theme-neural-local .header-actions .nbell .bdg {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c61a3a, #f05267);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(16, 3, 9, 0.44);
}

.theme-neural-local .notif-panel.notif-center {
  display: none;
  position: fixed;
  top: 70px;
  right: 12px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(70dvh, 680px);
  overflow-y: auto;
  z-index: 1400;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(13, 29, 55, 0.96), rgba(8, 19, 39, 0.97));
  box-shadow: 0 24px 46px rgba(2, 9, 24, 0.5);
  padding: 12px;
}

.theme-neural-local .notif-panel.notif-center.open {
  display: block;
}

.theme-neural-local .notif-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.theme-neural-local .notif-center-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.theme-neural-local .notif-center-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-neural-local .notif-center-actions .tb-btn {
  padding: 5px 9px;
  font-size: 10px;
}

.theme-neural-local .notif-panel.notif-center #notifSummary {
  font-size: 10px !important;
  margin-bottom: 8px !important;
  color: var(--muted);
}

.theme-neural-local .notif-panel.notif-center .notif-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 8px;
  background: var(--card-strong);
}

.theme-neural-local .notif-panel.notif-center .notif-item.unread {
  border-color: rgba(112, 184, 255, 0.62);
  background: rgba(16, 45, 85, 0.58);
}

.theme-neural-local .notif-panel.notif-center .notif-item:last-child {
  margin-bottom: 0;
}

.theme-neural-local .notif-row-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-neural-local .notif-row-actions .tb-btn {
  padding: 4px 8px;
  font-size: 10px;
}

.theme-neural-local[data-mobile="true"] .notif-panel.notif-center {
  top: 84px;
  right: 10px;
  left: 10px;
  width: auto;
  max-height: calc(100dvh - 100px);
  padding: 10px;
}

.theme-neural-local[data-mobile="true"] .notif-center-head {
  flex-direction: column;
  align-items: flex-start;
}

.theme-neural-local[data-mobile="true"] .notif-center-actions {
  width: 100%;
}

.theme-neural-local .tb-btn,
.theme-neural-local .btn-ghost {
  background: linear-gradient(135deg, var(--pri), var(--pri-2)) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.26) !important;
  box-shadow: 0 8px 16px rgba(12, 33, 66, 0.22) !important;
}

.theme-neural-local .tb-btn:hover,
.theme-neural-local .btn-ghost:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.theme-neural-local .qb {
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 14px rgba(10, 24, 46, 0.2);
}

.theme-neural-local .m-widget {
  background: var(--card-strong) !important;
  border-color: var(--border) !important;
}

.theme-neural-local .mw-txt {
  color: var(--text) !important;
}

.theme-neural-local .tab-bar {
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  background: var(--card-strong);
}

.theme-neural-local .tab {
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.01em;
  font-weight: 700;
  padding: 6px 8px;
}

.theme-neural-local .tab:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.theme-neural-local .tab.act {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--pri), var(--pri-2));
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
}

.theme-neural-local #tabBar .tab[onclick*="openNewCustModal"] {
  margin-left: auto !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #0a7e4f, #2ec68b) !important;
}

.theme-neural-local .kpi-hdr-bar {
  border-radius: 12px;
  padding: 6px 10px;
  gap: 12px;
  background: var(--card-strong);
}

.theme-neural-local .kh-item {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.theme-neural-local .kh-item span {
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 12px;
}

.theme-neural-local .kh-item.rd span { color: var(--err); }
.theme-neural-local .kh-item.gn span { color: var(--ok); }
.theme-neural-local .kh-item.bl span { color: var(--pri); }

.theme-neural-local .toolbar-v2 {
  border-radius: 12px;
  padding: 8px;
  background: var(--card-strong);
}

.theme-neural-local .toolbar-v2 .t-row {
  padding: 4px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.theme-neural-local .toolbar-v2 .t-row > div[style*="margin-left:auto"] {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px !important;
  min-width: 0;
}

.theme-neural-local .t-right-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-neural-local .t-menu-wrap {
  position: relative;
}

.theme-neural-local .t-menu-wrap[open] {
  z-index: 1300;
}

.theme-neural-local .t-menu-wrap > summary {
  list-style: none;
  cursor: pointer;
}

.theme-neural-local .t-action-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.theme-neural-local .t-action-menu > summary::after {
  content: "\25BE";
  font-size: 9px;
  opacity: 0.92;
}

.theme-neural-local .t-menu-wrap > summary::-webkit-details-marker {
  display: none;
}

.theme-neural-local .t-menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  max-height: min(60vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 1200;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  flex-direction: column;
  gap: 6px;
}

.theme-neural-local .t-menu-wrap[open] .t-menu-panel {
  display: flex;
}

.theme-neural-local .t-actions .t-action-menu .t-menu-panel {
  left: 0;
  right: auto;
}

.theme-neural-local .t-menu-panel .tb-btn {
  width: 100%;
  justify-content: flex-start;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.theme-neural-local .toolbar-v2 .tb-search,
.theme-neural-local .toolbar-v2 .tb-sel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 9px;
  height: 28px;
}

.theme-neural-local .toolbar-v2 .tb-search::placeholder { color: var(--muted); }

.theme-neural-local .t-badge-btn,
.theme-neural-local .t-act-btn,
.theme-neural-local .btn,
.theme-neural-local .t-add-btn {
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 9px;
  padding: 5px 8px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.16);
  transition: transform 120ms ease, filter 120ms ease;
}

.theme-neural-local .month-control-chip,
.theme-neural-local .month-control-btn {
  background: linear-gradient(135deg, #475569, #64748b) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

.theme-neural-local .t-badge-btn:hover,
.theme-neural-local .t-act-btn:hover,
.theme-neural-local .btn:hover,
.theme-neural-local .t-add-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.theme-neural-local .t-badge-btn.gn,
.theme-neural-local .t-act-btn.gn,
.theme-neural-local .btn.bp { background: linear-gradient(135deg, #0a7e4f, #2ec68b); color: #fff; }

.theme-neural-local .t-badge-btn.yw,
.theme-neural-local .t-act-btn.yw { background: linear-gradient(135deg, #b46e00, #e8a62f); color: #fff; }

.theme-neural-local .t-badge-btn.rd,
.theme-neural-local .btn.br { background: linear-gradient(135deg, #ba2840, #f0586d); color: #fff; }

.theme-neural-local .t-badge-btn.bl,
.theme-neural-local .t-act-btn.bl,
.theme-neural-local .t-act-btn.bm,
.theme-neural-local .btn.bm,
.theme-neural-local .t-add-btn {
  background: linear-gradient(135deg, #0a7e4f, #2ec68b);
  color: #fff;
}

.theme-neural-local .t-act-btn.bm {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 18px rgba(19, 36, 71, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.theme-neural-local .t-add-btn { border-radius: 999px; }

.theme-neural-local .t-pg {
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 9px;
}

.theme-neural-local .t-pg button { color: var(--pri); font-size: 9px; }
.theme-neural-local .t-count { color: var(--muted); font-size: 9px; }

.theme-neural-local .panel.show {
  border-radius: 14px;
  overflow: auto;
  background: var(--card);
}

.theme-neural-local .panel > h2 {
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  color: var(--text);
  letter-spacing: 0.01em;
  font-size: 17px;
}

.theme-neural-local .C {
  border-radius: 12px;
  background: var(--card-strong);
}

.theme-neural-local .C h3 {
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  color: var(--text);
  font-size: 14px;
}

.theme-neural-local .fi label {
  color: var(--muted);
  letter-spacing: 0.05em;
  font-size: 10px;
}

.theme-neural-local .fi input,
.theme-neural-local .fi select,
.theme-neural-local .fi textarea {
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 8px;
  font-size: 11px;
}

.theme-neural-local .fi input:focus,
.theme-neural-local .fi select:focus,
.theme-neural-local .fi textarea:focus {
  border-color: var(--pri);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.16);
}

.theme-neural-local .panel table:not(.sheet),
.theme-neural-local table.sheet {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-strong);
  border-collapse: collapse;
}

.theme-neural-local table.sheet {
  width: max-content;
}

.theme-neural-local .panel table:not(.sheet) th,
.theme-neural-local table.sheet th,
.theme-neural-local table.sheet th.day-hdr,
.theme-neural-local table.sheet th.day-hdr.today,
.theme-neural-local table.sheet th.day-hdr.sun {
  background: var(--card-strong) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
  font-weight: 700;
  font-size: 10px;
  padding: 8px 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--border) !important;
  text-align: left;
}

.theme-neural-local table.sheet th.day-hdr {
  text-align: center;
  min-width: 34px;
}

.theme-neural-local .panel table:not(.sheet) td,
.theme-neural-local table.sheet td {
  border-color: rgba(120, 150, 200, 0.28);
  color: var(--text) !important;
  font-size: 12px;
  padding: 8px 10px;
  font-family: var(--font);
  background: transparent;
}

.theme-neural-local table.sheet td.num {
  font-family: var(--font);
  font-weight: 600;
}

.theme-neural-local table.sheet td.name {
  font-size: 12px;
  font-weight: 600;
  background: inherit !important;
}

.theme-neural-local table.sheet td.actions-cell {
  padding: 6px 8px;
}

.theme-neural-local table.sheet td.dc {
  color: var(--text);
  background: transparent;
  min-width: 34px;
  font-size: 11px;
  font-family: var(--font);
  padding: 8px 6px;
}

.theme-neural-local[data-mode="light"] table.sheet td.dc {
  background: transparent;
}

.theme-neural-local table.sheet td.dc.z {
  color: var(--muted);
}

.theme-neural-local table.sheet td.dc.v {
  font-weight: 700;
}

.theme-neural-local table.sheet td.dc.ov {
  background: rgba(243, 162, 58, 0.16) !important;
  color: var(--warn);
}

.theme-neural-local[data-mode="light"] table.sheet td.dc.ov {
  background: rgba(243, 162, 58, 0.22) !important;
  color: #8a5608;
}

.theme-neural-local table.sheet td.editable:hover {
  background: rgba(112, 184, 255, 0.14) !important;
  outline: 1px solid var(--pri);
}

.theme-neural-local[data-mode="light"] table.sheet td.editable:hover {
  background: rgba(112, 184, 255, 0.18) !important;
}

.theme-neural-local .bill-col {
  background: transparent !important;
}

.theme-neural-local[data-mode="light"] .bill-col {
  background: transparent !important;
}

.theme-neural-local table.sheet tr:nth-child(even) td { background: rgba(120, 150, 200, 0.08); }
.theme-neural-local[data-mode="light"] table.sheet tr:nth-child(even) td { background: #f7fbff; }
.theme-neural-local table.sheet tr:hover td,
.theme-neural-local .panel table:not(.sheet) tr:hover td { background: rgba(112, 184, 255, 0.14); }

.theme-neural-local #dayColsSel {
  border-color: var(--pri) !important;
  box-shadow: 0 0 0 1px rgba(112, 184, 255, 0.26) inset;
  font-weight: 800;
}

/* Force grid table to match monitor table visual language */
.theme-neural-local table.sheet.monitor-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse !important;
  border: 1px solid var(--border) !important;
  background: var(--card-strong) !important;
}

.theme-neural-local table.sheet.monitor-grid th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--border) !important;
  border-right: 1px solid rgba(120, 150, 200, 0.18);
  background: var(--card-strong) !important;
}

.theme-neural-local table.sheet.monitor-grid th.day-hdr,
.theme-neural-local table.sheet.monitor-grid th.day-hdr.today,
.theme-neural-local table.sheet.monitor-grid th.day-hdr.sun {
  min-width: 34px;
  text-align: center;
  color: var(--muted) !important;
  background: var(--card-strong) !important;
  border-color: var(--border) !important;
}

.theme-neural-local table.sheet.monitor-grid td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 150, 200, 0.24);
  border-right: 1px solid rgba(120, 150, 200, 0.14);
  color: var(--text) !important;
  font-family: var(--font);
  font-size: 12px;
  background: transparent !important;
}

.theme-neural-local table.sheet.monitor-grid tr:nth-child(even) td {
  background: rgba(120, 150, 200, 0.08) !important;
}

.theme-neural-local[data-mode="light"] table.sheet.monitor-grid tr:nth-child(even) td {
  background: #f7fbff !important;
}

.theme-neural-local table.sheet.monitor-grid tr:hover td {
  background: rgba(112, 184, 255, 0.14) !important;
}

.theme-neural-local table.sheet.monitor-grid td.name {
  font-size: 12px;
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit !important;
}

.theme-neural-local table.sheet.monitor-grid td.num {
  font-family: var(--font);
  font-weight: 600;
}

.theme-neural-local table.sheet.monitor-grid td.day-col {
  text-align: center;
  min-width: 34px;
  font-size: 11px;
  padding: 8px 6px;
  font-family: var(--font);
}

.theme-neural-local table.sheet.monitor-grid td.day-col.ov {
  background: rgba(243, 162, 58, 0.16) !important;
  color: var(--warn) !important;
}

.theme-neural-local[data-mode="light"] table.sheet.monitor-grid td.day-col.ov {
  background: rgba(243, 162, 58, 0.22) !important;
}

.theme-neural-local table.sheet.monitor-grid td.editable:hover {
  background: rgba(112, 184, 255, 0.18) !important;
  outline: 1px solid var(--pri);
}

.theme-neural-local table.sheet.monitor-grid td.actions-cell {
  display: table-cell !important;
  text-align: center;
  padding: 6px 8px;
  min-width: 236px;
  white-space: nowrap;
}

.theme-neural-local table.sheet.monitor-grid .grid-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.theme-neural-local table.sheet.monitor-grid .grid-actions .tb-btn {
  padding: 3px 7px;
  height: 24px;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: #60a5fa !important;
  color: #fff !important;
  box-shadow: none !important;
}

.theme-neural-local table.sheet.monitor-grid td.grid-row-select-cell {
  min-width: 28px;
  width: 28px;
  text-align: center;
  padding: 4px 6px;
}

.theme-neural-local table.sheet.monitor-grid input.grid-row-select,
.theme-neural-local table.sheet.monitor-grid #gridSelectAllChk {
  width: 14px;
  height: 14px;
  accent-color: #60a5fa;
  cursor: pointer;
}

.theme-neural-local table.sheet.monitor-grid tr.grid-summary-row td {
  background: rgba(31, 111, 235, 0.16) !important;
  border-top: 1px solid rgba(112, 184, 255, 0.45);
  font-weight: 700;
}

.theme-neural-local .quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.theme-neural-local .quick-actions .tb-btn {
  min-width: 62px;
  text-align: center;
}

.theme-neural-local #subCalModal .modal,
.theme-neural-local #dayLogModal .modal {
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.theme-neural-local #quickListModal .modal {
  width: min(1100px, 96vw);
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.theme-neural-local #subCalGrid {
  overflow: auto;
  max-height: calc(92vh - 170px);
  padding-right: 4px;
}

.theme-neural-local #dayLogBody {
  overflow: auto;
  max-height: calc(92vh - 120px);
  padding-right: 4px;
}

.theme-neural-local #quickListBody {
  overflow: auto;
  max-height: calc(90vh - 120px);
  padding-right: 4px;
}

.theme-neural-local .sheet-wrap.hide-day-cols table.sheet th.day-col,
.theme-neural-local .sheet-wrap.hide-day-cols table.sheet td.day-col {
  display: none;
}

.theme-neural-local .sheet-wrap {
  scrollbar-width: thin;
  scrollbar-color: var(--pri) rgba(120, 150, 200, 0.2);
}

.theme-neural-local .modal-bg { background: rgba(8, 18, 38, 0.4); }

.theme-neural-local .modal-bg {
  background: rgba(8, 18, 38, 0.56);
  backdrop-filter: blur(4px);
}

.theme-neural-local .modal {
  border-radius: 14px;
  border-color: var(--border);
  background: var(--card-strong);
}

.theme-neural-local .modal h2,
.theme-neural-local .modal h3 {
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  color: var(--text);
}

.theme-neural-local .ld,
.theme-neural-local .muted { color: var(--muted); font-size: 11px; }

.theme-neural-local .admin-only { border-color: var(--border); }

@media (max-width: 960px) {
  html,
  body.theme-neural-local {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .theme-neural-local {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .theme-neural-local .app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 8px;
    gap: 10px;
  }

  .theme-neural-local .app-header {
    height: auto;
    min-height: 52px;
    padding: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .theme-neural-local .app-header .logo { font-size: 17px; }

  .theme-neural-local .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
  }

  .theme-neural-local .header-actions #userInfo {
    grid-column: 1 / -1;
  }

  .theme-neural-local .header-actions button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .theme-neural-local .neural-theme-control { min-width: 0; width: 100%; }

  .theme-neural-local .tab-bar {
    padding: 6px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .theme-neural-local .tab {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 10px;
    padding: 8px 10px;
  }

  .theme-neural-local #tabBar .tab[onclick*="openNewCustModal"] {
    margin-left: 0 !important;
    order: 99;
    flex: 0 0 auto;
  }

  .theme-neural-local .kpi-hdr-bar {
    padding: 8px 10px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .theme-neural-local .toolbar-v2 {
    padding: 8px;
    gap: 8px;
  }

  .theme-neural-local .toolbar-v2 .t-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
  }

  .theme-neural-local .toolbar-v2 .tb-search,
  .theme-neural-local .toolbar-v2 .tb-sel,
  .theme-neural-local .toolbar-v2 .t-row button,
  .theme-neural-local .toolbar-v2 .t-row details > summary {
    width: 100%;
    min-width: 0;
    height: 34px;
  }

  .theme-neural-local .toolbar-v2 .tb-search {
    grid-column: 1 / -1;
  }

  .theme-neural-local .toolbar-v2 .t-row > div[style*="margin-left:auto"] {
    margin-left: 0 !important;
    width: 100%;
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px !important;
  }

  .theme-neural-local .toolbar-v2 .t-row.t-actions .t-pg,
  .theme-neural-local .toolbar-v2 .t-row.t-actions .t-count,
  .theme-neural-local .toolbar-v2 .t-row.t-actions .t-add-btn {
    grid-column: 1 / -1;
  }

  .theme-neural-local .toolbar-v2 .t-row.t-actions .t-pg {
    justify-content: center;
    width: 100%;
  }

  .theme-neural-local .toolbar-v2 .t-row.t-actions .t-count {
    width: 100%;
    text-align: left;
  }

  .theme-neural-local .panel {
    min-height: 0;
  }

  .theme-neural-local .panel.show {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .theme-neural-local #pGrid.panel.show {
    min-height: 56dvh;
    overflow: hidden;
  }

  .theme-neural-local #pGrid .sheet-wrap {
    min-height: 44dvh;
    max-height: 66dvh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
  }
}

@media (max-width: 560px) {
  .theme-neural-local .header-actions {
    grid-template-columns: 1fr;
  }

  .theme-neural-local .toolbar-v2 .t-row {
    grid-template-columns: 1fr;
  }

  .theme-neural-local .toolbar-v2 .t-row > div[style*="margin-left:auto"] {
    grid-template-columns: 1fr;
  }
}

/* Unified neural surface for dynamic panels, cards, and popups */
.theme-neural-local .an {
  padding: 16px;
  gap: 12px;
}

.theme-neural-local .ac {
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--module-shadow);
}

.theme-neural-local .ac h3 {
  color: var(--muted);
}

.theme-neural-local .ac .bn,
.theme-neural-local .ac .sn {
  color: var(--text);
}

.theme-neural-local .stg {
  padding: 18px;
  max-width: 940px;
}

.theme-neural-local .cr {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.theme-neural-local .cr label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.theme-neural-local .cr input {
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  border-radius: 8px;
}

.theme-neural-local .modal-bg {
  z-index: 1300;
}

.theme-neural-local .modal {
  width: min(920px, 96vw);
  max-height: min(92dvh, 920px);
  padding: 16px;
}

/* Customer profile/calendar must scroll through all dates inside modal */
.theme-neural-local #custDetailModal {
  align-items: flex-start;
  padding: 10px;
  overflow-y: auto;
}

.theme-neural-local #custDetailModal .modal {
  width: min(1120px, 96vw);
  max-height: calc(100dvh - 20px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
}

.theme-neural-local #custDetailModal #cdView {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.theme-neural-local .modal .C {
  margin-left: 0 !important;
  margin-right: 0 !important;
  background: var(--card) !important;
}

.theme-neural-local .table-mobile-wrap,
.theme-neural-local .track-ops-list,
.theme-neural-local #dayLogBody > .C,
.theme-neural-local #quickListBody > .C {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  background: var(--card-strong);
}

.theme-neural-local .table-mobile-wrap table,
.theme-neural-local .track-ops-list table {
  margin-top: 0;
}

.theme-neural-local .table-mobile-wrap::-webkit-scrollbar,
.theme-neural-local .track-ops-list::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.theme-neural-local .table-mobile-wrap::-webkit-scrollbar-thumb,
.theme-neural-local .track-ops-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--pri), var(--pri-2));
  border-radius: 999px;
}

.theme-neural-local .track-gen-more {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--border);
}

.theme-neural-local .track-gen-actions .tb-btn {
  border-color: var(--border);
  background: color-mix(in srgb, var(--input-bg) 88%, transparent);
  color: var(--text);
}

.theme-neural-local .track-gen-actions .tb-btn.btn-done {
  background: linear-gradient(135deg, #166534, #22c55e);
  color: #dcfce7;
}

.theme-neural-local .track-gen-actions .tb-btn.btn-skip {
  background: linear-gradient(135deg, #991b1b, #ef4444);
  color: #fee2e2;
}

.theme-neural-local .track-gen-actions .tb-btn.btn-pending {
  background: linear-gradient(135deg, #92400e, #f59e0b);
  color: #fef3c7;
}

.theme-neural-local .track-gen-actions .tb-btn.btn-prof {
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  color: #dbeafe;
}

.theme-neural-local .track-inline-input,
.theme-neural-local .track-inline-select {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
}

.theme-neural-local .track-advanced {
  background: color-mix(in srgb, var(--card) 94%, transparent);
}

.theme-neural-local #pTrack > .C {
  overflow: visible;
  position: relative;
  z-index: 40;
}

.theme-neural-local #pTrack .track-ops-toolbar {
  overflow: visible;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.theme-neural-local #pTrack .track-ops-toolbar .fi {
  min-width: 0;
}

.theme-neural-local #pTrack .track-ops-toolbar .fi input,
.theme-neural-local #pTrack .track-ops-toolbar .fi select {
  width: 100%;
}

.theme-neural-local #pTrack .track-ops-actions {
  overflow: visible;
  position: relative;
  z-index: 41;
}

.theme-neural-local #pTrack #trackContent {
  position: relative;
  z-index: 1;
}

.theme-neural-local #embeddedToolModal .modal {
  width: min(1280px, 96vw);
  max-width: min(1280px, 96vw);
  height: min(92dvh, 940px);
}

.theme-neural-local #embeddedToolFrame {
  background: var(--input-bg) !important;
}

.theme-neural-local .btn.bn-neutral {
  background: linear-gradient(135deg, #475569, #64748b) !important;
  color: #fff !important;
}

.theme-neural-local .btn.bn-info {
  background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
  color: #fff !important;
}

.theme-neural-local .btn.bn-warning {
  background: linear-gradient(135deg, #b45309, #d97706) !important;
  color: #fff !important;
}

.theme-neural-local .btn.bn-danger {
  background: linear-gradient(135deg, #991b1b, #dc2626) !important;
  color: #fff !important;
}

.theme-neural-local .btn.bn-success {
  background: linear-gradient(135deg, #166534, #16a34a) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#0f172a"] {
  background: linear-gradient(135deg, #334155, #475569) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#065f46"] {
  background: linear-gradient(135deg, #166534, #16a34a) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#7c2d12"] {
  background: linear-gradient(135deg, #9a3412, #ea580c) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#2563eb"] {
  background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#b45309"] {
  background: linear-gradient(135deg, #b45309, #f59e0b) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#991b1b"] {
  background: linear-gradient(135deg, #991b1b, #ef4444) !important;
  color: #fff !important;
}

.theme-neural-local .btn[style*="#166534"] {
  background: linear-gradient(135deg, #166534, #22c55e) !important;
  color: #fff !important;
}

/* Mobile grid cards */
.theme-neural-local .sheet-wrap.mobile-cards {
  overflow: visible;
  padding: 0;
}

.theme-neural-local .grid-mobile-list {
  display: grid;
  gap: 10px;
}

.theme-neural-local .grid-mobile-filter-card {
  border: 1px dashed rgba(112, 184, 255, 0.45);
  border-radius: 12px;
  background: rgba(12, 32, 61, 0.56);
  padding: 10px;
}

.theme-neural-local .grid-mobile-filter-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--pri-2);
}

.theme-neural-local .grid-mobile-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.theme-neural-local .grid-mobile-filter-cell label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.theme-neural-local .mobile-grid-date-input,
.theme-neural-local .mobile-grid-mode-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 11px;
  height: 32px;
  padding: 0 8px;
}

.theme-neural-local .grid-mobile-filter-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.theme-neural-local .grid-mobile-card,
.theme-neural-local .grid-mobile-summary,
.theme-neural-local .grid-mobile-empty {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-strong);
  box-shadow: var(--module-shadow);
  padding: 12px;
}

.theme-neural-local .grid-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-neural-local .grid-mobile-name {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.theme-neural-local .grid-mobile-meta,
.theme-neural-local .grid-mobile-days {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}

.theme-neural-local .grid-mobile-trust {
  margin-top: 4px;
}

.theme-neural-local .grid-mobile-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.theme-neural-local .grid-mobile-kpi {
  border: 1px solid rgba(120, 150, 200, 0.24);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-neural-local .grid-mobile-kpi span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.theme-neural-local .grid-mobile-kpi b {
  color: var(--text);
}

.theme-neural-local .grid-mobile-actions {
  display: block;
  margin-top: 10px;
}

.theme-neural-local .grid-mobile-day-edit {
  margin-top: 10px;
  border: 1px solid rgba(120, 150, 200, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
}

.theme-neural-local .grid-mobile-day-label {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 6px;
}

.theme-neural-local .grid-mobile-day-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.theme-neural-local .mobile-day-qty-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 12px;
  height: 32px;
  padding: 0 8px;
}

.theme-neural-local .grid-mobile-action-menu {
  margin: 0;
}

.theme-neural-local .grid-mobile-action-menu > summary {
  list-style: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.theme-neural-local .grid-mobile-action-menu > summary::-webkit-details-marker {
  display: none;
}

.theme-neural-local .grid-mobile-action-list {
  display: none;
  margin-top: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.theme-neural-local .grid-mobile-action-menu[open] .grid-mobile-action-list {
  display: grid;
}

.theme-neural-local .grid-mobile-action-list .tb-btn {
  width: 100%;
  justify-content: center;
}

.theme-neural-local .grid-mobile-summary h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

/* Calendar visual polish */
.theme-neural-local .subcal-hint {
  margin-bottom: 10px;
}

.theme-neural-local .subcal-kpis {
  margin-bottom: 12px;
}

.theme-neural-local .cal-kpi-err {
  color: var(--err) !important;
}

.theme-neural-local .cal-kpi-ok {
  color: var(--ok) !important;
}

.theme-neural-local .subcal-toolbar {
  margin-bottom: 10px;
}

.theme-neural-local .subcal-filter-chip {
  margin-bottom: 10px;
  font-size: 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(112, 184, 255, 0.12);
  color: var(--text);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-neural-local .subcal-pause-req {
  padding: 10px !important;
  margin-bottom: 10px;
}

.theme-neural-local .subcal-pause-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
}

.theme-neural-local .subcal-pause-list {
  display: grid;
  gap: 6px;
}

.theme-neural-local .subcal-pause-item {
  font-size: 11px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.theme-neural-local .subcal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.theme-neural-local .subcal-weekday {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.theme-neural-local .cal-empty-slot {
  min-height: 6px;
}

.theme-neural-local .cal-day {
  min-height: 94px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-strong);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.theme-neural-local .cal-day.state-done {
  background: rgba(16, 185, 129, 0.12);
}

.theme-neural-local .cal-day.state-skipped {
  background: rgba(239, 68, 68, 0.12);
}

.theme-neural-local .cal-day.state-paused {
  background: rgba(245, 158, 11, 0.14);
}

.theme-neural-local .cal-day.state-override {
  background: rgba(139, 92, 246, 0.16);
}

.theme-neural-local .cal-day.state-missed {
  background: rgba(220, 38, 38, 0.14);
}

.theme-neural-local .cal-day.has-dispute {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.24) inset;
}

.theme-neural-local .cal-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.theme-neural-local .cal-day-num {
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
}

.theme-neural-local .cal-day-badges {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.theme-neural-local .cal-dispute-count {
  font-size: 10px;
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  padding: 1px 6px;
  border-radius: 999px;
}

.theme-neural-local .cal-log-btn {
  padding: 2px 7px !important;
  font-size: 10px !important;
}

.theme-neural-local .cal-empty {
  color: var(--muted);
  font-size: 10px;
}

.theme-neural-local .cal-chip {
  border: 1px solid rgba(120, 150, 200, 0.34);
  border-radius: 999px;
  background: var(--input-bg);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
}

.theme-neural-local .cal-chip-name {
  color: var(--muted);
}

.theme-neural-local .cal-chip-label {
  opacity: 0.9;
}

.theme-neural-local .cal-chip-qty {
  font-weight: 800;
}

.theme-neural-local .cal-chip.status-done {
  border-color: rgba(16, 185, 129, 0.45);
  color: #86efac;
}

.theme-neural-local .cal-chip.status-skipped,
.theme-neural-local .cal-chip.status-missed {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.theme-neural-local .cal-chip.status-paused {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.theme-neural-local .cal-chip.status-override {
  border-color: rgba(139, 92, 246, 0.55);
  color: #d8b4fe;
}

.theme-neural-local .cal-chip.status-pending {
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--text);
}

.theme-neural-local .cal-chip.strike .cal-chip-qty,
.theme-neural-local .cal-chip.strike .cal-chip-label {
  text-decoration: line-through;
}

/* Customer profile card theme */
.theme-neural-local .cdp-card,
.theme-neural-local .cdp-calendar-shell,
.theme-neural-local .cdp-share-box {
  background: var(--card-strong);
  border-color: var(--border);
}

.theme-neural-local .cdp-day-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}

.theme-neural-local .cdp-day-card.state-done {
  background: rgba(16, 185, 129, 0.11);
}

.theme-neural-local .cdp-day-card.state-paused {
  background: rgba(245, 158, 11, 0.13);
}

.theme-neural-local .cdp-day-card.state-skipped,
.theme-neural-local .cdp-day-card.state-missed {
  background: rgba(239, 68, 68, 0.12);
}

.theme-neural-local .cdp-day-card.state-override {
  background: rgba(139, 92, 246, 0.14);
}

.theme-neural-local .cdp-day-card.has-dispute {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28) inset;
}

.theme-neural-local .cdp-day-line {
  background: var(--input-bg);
  border-color: rgba(120, 150, 200, 0.32);
  color: var(--text);
}

.theme-neural-local .cdp-day-line.status-done {
  border-color: rgba(16, 185, 129, 0.45);
}

.theme-neural-local .cdp-day-line.status-paused {
  border-color: rgba(245, 158, 11, 0.52);
}

.theme-neural-local .cdp-day-line.status-skipped,
.theme-neural-local .cdp-day-line.status-missed {
  border-color: rgba(239, 68, 68, 0.5);
}

.theme-neural-local .cdp-day-line.status-override {
  border-color: rgba(139, 92, 246, 0.52);
}

.theme-neural-local .cdp-day-line.strike .cdp-line-qty,
.theme-neural-local .cdp-day-line.strike .cdp-line-name {
  text-decoration: line-through;
}

.theme-neural-local .cdp-dispute-pill {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.22);
}

.theme-neural-local .wa-widget-btn {
  background: linear-gradient(120deg, #1cc561, #0f8f41);
  box-shadow: 0 10px 24px rgba(8, 26, 49, 0.45);
}

.theme-neural-local .wa-widget-btn:hover {
  filter: brightness(1.05);
}

/* True mobile layout */
@media (max-width: 960px) {
  .theme-neural-local[data-mobile="true"] .cdp-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .theme-neural-local[data-mobile="true"] .cdp-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .theme-neural-local[data-mobile="true"] .cdp-head-actions .tb-btn {
    width: 100%;
    justify-content: center;
  }

  .theme-neural-local[data-mobile="true"] .cdp-calendar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .theme-neural-local[data-mobile="true"] .cdp-calendar-actions .tb-btn {
    width: 100%;
    justify-content: center;
  }

  .theme-neural-local[data-mobile="true"] .cdp-sub-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .theme-neural-local[data-mobile="true"] .cdp-sub-filter-row .tb-btn {
    width: 100%;
    justify-content: center;
  }

  .theme-neural-local[data-mobile="true"] .wa-widget-btn {
    right: 12px;
    bottom: 12px;
  }

  .theme-neural-local[data-mobile="true"] .app-shell {
    height: auto;
    min-height: 100dvh;
    padding: 10px;
    gap: 10px;
    overflow: visible;
  }

  .theme-neural-local[data-mobile="true"] .app-header {
    position: sticky;
    top: 0;
    z-index: 80;
    padding: 10px;
  }

  .theme-neural-local[data-mobile="true"] .tab-bar {
    gap: 6px;
    padding: 6px;
  }

  .theme-neural-local[data-mobile="true"] .tab {
    font-size: 10px;
    padding: 8px 10px;
  }

  .theme-neural-local[data-mobile="true"] .kpi-hdr-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    white-space: normal;
    overflow: visible;
    gap: 8px;
  }

  .theme-neural-local[data-mobile="true"] .kpi-hdr-bar .kh-item {
    display: flex;
    justify-content: space-between;
  }

  .theme-neural-local[data-mobile="true"] .toolbar-v2 .t-row {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .t-right-actions,
.theme-neural-local[data-mobile="true"] .toolbar-v2 .t-row > div[style*="margin-left:auto"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .theme-neural-local[data-mobile="true"] .panel,
  .theme-neural-local[data-mobile="true"] .panel.show {
    padding: 12px !important;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .theme-neural-local[data-mobile="true"] .panel > h2 {
    padding: 0 !important;
    margin: 0 0 10px 0 !important;
    font-size: 16px;
  }

  .theme-neural-local[data-mobile="true"] .panel > .C,
  .theme-neural-local[data-mobile="true"] .panel > .fg,
  .theme-neural-local[data-mobile="true"] .panel > .fbar,
  .theme-neural-local[data-mobile="true"] .panel > .brow,
  .theme-neural-local[data-mobile="true"] .panel > button,
  .theme-neural-local[data-mobile="true"] .panel > div:not(.sheet-wrap):not(.an):not(.stg):not(.wizard):not(.fl) {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .theme-neural-local[data-mobile="true"] .fg,
  .theme-neural-local[data-mobile="true"] .track-ops-toolbar {
    grid-template-columns: 1fr !important;
  }

  .theme-neural-local[data-mobile="true"] .brow,
  .theme-neural-local[data-mobile="true"] .track-ops-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .theme-neural-local[data-mobile="true"] .track-gen-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-neural-local[data-mobile="true"] .track-gen-actions {
    min-width: 0;
  }

  .theme-neural-local[data-mobile="true"] .track-gen-more {
    width: 100%;
    max-width: none;
  }

  .theme-neural-local[data-mobile="true"] .brow .btn,
  .theme-neural-local[data-mobile="true"] .track-ops-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .theme-neural-local[data-mobile="true"] .an {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .theme-neural-local[data-mobile="true"] .stg {
    padding: 10px;
  }

  .theme-neural-local[data-mobile="true"] .cr {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .theme-neural-local[data-mobile="true"] .table-mobile-wrap {
    width: 100%;
    overflow: auto;
  }

  .theme-neural-local[data-mobile="true"] .table-mobile-wrap table {
    min-width: 680px;
  }

  .theme-neural-local[data-mobile="true"] .modal-bg {
    align-items: flex-end;
    padding: 8px;
  }

  .theme-neural-local[data-mobile="true"] .modal {
    width: 100%;
    max-width: none !important;
    max-height: 92dvh !important;
    border-radius: 14px 14px 10px 10px;
    padding: 14px;
  }

  .theme-neural-local[data-mobile="true"] #custDetailModal .modal {
    max-height: 94dvh !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
  }

  .theme-neural-local[data-mobile="true"] #custDetailModal #cdView {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .theme-neural-local[data-mobile="true"] #embeddedToolModal .modal {
    height: 90dvh !important;
  }

  .theme-neural-local[data-mobile="true"] #subCalGrid,
  .theme-neural-local[data-mobile="true"] #dayLogBody,
  .theme-neural-local[data-mobile="true"] #quickListBody {
    max-height: calc(90dvh - 190px);
  }

  .theme-neural-local[data-mobile="true"] .subcal-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-neural-local[data-mobile="true"] .subcal-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .theme-neural-local[data-mobile="true"] .subcal-toolbar .tb-btn {
    width: 100%;
    justify-content: center;
  }

  .theme-neural-local[data-mobile="true"] .subcal-filter-chip {
    flex-direction: column;
    align-items: flex-start;
  }

  .theme-neural-local[data-mobile="true"] .subcal-grid {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .subcal-weekday {
    display: none;
  }

  .theme-neural-local[data-mobile="true"] .cal-day {
    min-height: auto;
    padding: 10px;
  }

  .theme-neural-local[data-mobile="true"] .cal-chip-wrap {
    gap: 5px;
  }

  .theme-neural-local[data-mobile="true"] .cal-chip {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* Hard layout guard: prevent panel bottom clipping across tabs */
html,
body.theme-neural-local,
body.eb-admin-theme.theme-neural-local {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.eb-admin-theme.theme-neural-local .app-shell {
  height: auto !important;
  min-height: 100dvh !important;
  overflow: visible !important;
  padding-bottom: 24px !important;
}

body.eb-admin-theme.theme-neural-local .panel {
  min-height: 0 !important;
}

body.eb-admin-theme.theme-neural-local .panel.show {
  display: flex !important;
  flex-direction: column !important;
  overflow-x: visible !important;
  overflow-y: auto !important;
  max-height: none !important;
  -webkit-overflow-scrolling: touch;
}

body.eb-admin-theme.theme-neural-local #pAreas.panel.show,
body.eb-admin-theme.theme-neural-local #pProducts.panel.show,
body.eb-admin-theme.theme-neural-local #pUsers.panel.show,
body.eb-admin-theme.theme-neural-local #pRequests.panel.show,
body.eb-admin-theme.theme-neural-local #pWaTriggers.panel.show,
body.eb-admin-theme.theme-neural-local #pWaTemplates.panel.show {
  overflow-y: auto !important;
  max-height: none !important;
}

body.eb-admin-theme.theme-neural-local .table-mobile-wrap {
  overflow: auto !important;
  max-height: none !important;
}

@media (max-width: 560px) {
  .theme-neural-local[data-mobile="true"] .cdp-calendar-actions {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .cdp-sub-filter-row {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .t-right-actions,
  .theme-neural-local[data-mobile="true"] .toolbar-v2 .t-row > div[style*="margin-left:auto"] {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .brow,
  .theme-neural-local[data-mobile="true"] .track-ops-actions,
  .theme-neural-local[data-mobile="true"] .grid-mobile-actions {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .grid-mobile-filter-row {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .grid-mobile-day-row {
    grid-template-columns: 1fr;
  }

  .theme-neural-local[data-mobile="true"] .grid-mobile-action-list {
    grid-template-columns: 1fr 1fr;
  }
}
