:root {
  --bg: #0B1220;
  --card: rgba(255, 255, 255, .07);
  --stroke: rgba(255, 255, 255, .18);
  --line: var(--stroke);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .70);
  --accent: #FE4E0E;
  --luxGold: #E7D5B7;
  --luxBlue: #4D7CFE;
  --danger: #ff3b30;
  --good: #34c759;
  --warn: #ffcc00;
  --shadow: 0 12px 38px rgba(0, 0, 0, .36);
  --glassBlur: 16px;
  --r: 18px;
  --r2: 14px;
  --scroll-track: rgba(255, 255, 255, .05);
  --scroll-thumb: rgba(254, 78, 14, .58);
  --scroll-thumb-strong: rgba(254, 78, 14, .84);
  --scroll-thumb-edge: rgba(11, 18, 32, .88);
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid var(--scroll-thumb-edge);
  background: linear-gradient(180deg, var(--scroll-thumb-strong), rgba(255, 255, 255, .16));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 146, 91, .96), rgba(255, 255, 255, .22));
}

html,
body {
  height: 100%
}

html[data-theme="light"] {
  --scroll-track: rgba(11, 18, 32, .08);
  --scroll-thumb: rgba(254, 78, 14, .52);
  --scroll-thumb-strong: rgba(254, 78, 14, .78);
  --scroll-thumb-edge: rgba(255, 255, 255, .92);
}

html[data-theme="light"] .brand {
  border-color: rgba(0, 0, 0, .08);
  background:
    radial-gradient(circle at 16% 12%, rgba(254, 78, 14, .14), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .50), transparent 28%),
    linear-gradient(140deg, rgba(254, 78, 14, .11), rgba(255, 255, 255, .74) 44%, rgba(77, 124, 254, .08) 100%);
}

html[data-theme="light"] .logoPlate {
  border-color: rgba(0, 0, 0, .08);
  box-shadow:
    0 20px 34px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255, 255, 255, .34);
}

html[data-theme="light"] .logoScan {
  background:
    radial-gradient(circle at 6px 4px, rgba(255, 255, 255, .98) 0 2px, transparent 2.4px),
    linear-gradient(90deg,
      rgba(254, 78, 14, .92) 0%,
      rgba(254, 78, 14, .92) 22%,
      transparent 22%,
      transparent 31%,
      rgba(254, 78, 14, .92) 31%,
      rgba(254, 78, 14, .92) 50%,
      transparent 50%,
      transparent 57%,
      rgba(254, 78, 14, .96) 57%,
      rgba(254, 78, 14, .96) 84%,
      rgba(255, 255, 255, .96) 84%,
      rgba(255, 255, 255, .96) 100%);
}

html[data-theme="light"] .brandEyebrow {
  color: rgba(15, 20, 30, .48);
}

html[data-theme="light"] .side .brandSub {
  color: rgba(15, 20, 30, .66);
}

/* iOS Safari: make 100% heights predictable (especially with dynamic address bar). */
html.iosSafari {
  height: -webkit-fill-available;
}

html.iosSafari body {
  min-height: -webkit-fill-available;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 12% 8%, rgba(254, 78, 14, .22), rgba(254, 78, 14, 0) 55%),
    radial-gradient(900px 420px at 78% 10%, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 60%),
    radial-gradient(900px 520px at 35% 85%, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 60%),
    var(--bg);
}

.glass {
  border: 1px solid var(--stroke);
  background: var(--card);
  -webkit-backdrop-filter: blur(var(--glassBlur));
  backdrop-filter: blur(var(--glassBlur));
  box-shadow: var(--shadow);
  border-radius: var(--r);
}

.shell {
  max-width: 1720px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(332px, 360px) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(0, 1fr)
  }

  .side {
    position: relative
  }
}

.side {
  padding: 14px;
  position: sticky;
  top: 18px;
  align-self: start;
  min-height: calc((var(--vvh, 1vh) * 100) - 36px);
  max-height: calc((var(--vvh, 1vh) * 100) - 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 8%, rgba(254, 78, 14, .12), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(77, 124, 254, .10), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

.brand {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 4px 12px;
  margin: 0;
  overflow: visible;
}

.logo {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.logoAura {
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  background: radial-gradient(circle at 32% 30%, rgba(255, 164, 118, .22), rgba(254, 78, 14, 0) 72%);
  filter: blur(8px);
  opacity: .78;
}

.logoPlate {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    linear-gradient(145deg, rgba(255, 160, 110, .96) 0%, rgba(254, 78, 14, .94) 26%, rgba(18, 24, 38, .98) 26%, rgba(11, 18, 32, .96) 100%);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, .26),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brandLogoImg,
#brandLogoImg {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--brandLogoZoom, 1.15));
  transform-origin: center;
  border-radius: 0;
  background: rgba(8, 12, 20, .92);
  padding: 0;
}

.logoPlate[data-has-logo="1"] {
  background: rgba(11, 18, 32, .96);
}

.logoPlate[data-has-logo="1"]::before,
.logoPlate[data-has-logo="1"]::after,
.logoPlate[data-has-logo="1"] .logoAccent,
.logoPlate[data-has-logo="1"] .logoScan,
.logoPlate[data-has-logo="1"] .logoGlyph {
  opacity: 0;
}

.logoPlate::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, .18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0));
}

.logoPlate::after {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  right: -18px;
  top: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 68%);
  filter: blur(2px);
}

.logoAccent {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 26px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 228, 214, .98), rgba(254, 78, 14, .95));
  box-shadow: 0 0 14px rgba(254, 78, 14, .24);
}

.logoGlyph {
  position: relative;
  z-index: 2;
  margin-top: -3px;
  font-size: 19px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -.06em;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}

.logoScan {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  height: 8px;
  z-index: 2;
  border-radius: 999px;
  background:
    radial-gradient(circle at 6px 4px, rgba(255, 232, 220, .95) 0 2px, transparent 2.4px),
    linear-gradient(90deg,
      rgba(254, 78, 14, .88) 0%,
      rgba(254, 78, 14, .88) 22%,
      transparent 22%,
      transparent 31%,
      rgba(254, 78, 14, .88) 31%,
      rgba(254, 78, 14, .88) 50%,
      transparent 50%,
      transparent 57%,
      rgba(254, 78, 14, .92) 57%,
      rgba(254, 78, 14, .92) 84%,
      rgba(255, 225, 211, .9) 84%,
      rgba(255, 225, 211, .9) 100%);
  opacity: .95;
}

.brandCopy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
  padding-top: 0;
}

.brandEyebrow {
  display: none;
}

.side .brandName {
  font-size: 15px;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-weight: 950;
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.brandOwner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.brandOwnerDot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 232, 219, .95), rgba(254, 78, 14, .95));
  box-shadow: 0 0 10px rgba(254, 78, 14, .28);
}

.side .brandSub {
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.navSep {
  height: 1px;
  background: rgba(255, 255, 255, .04);
  margin: 8px 0
}

.navItem {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .08));
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 850;
}

.navItem .dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .25)
}

.navItem.active {
  border-color: rgba(254, 78, 14, .45);
  background: linear-gradient(135deg, rgba(254, 78, 14, .20), rgba(255, 255, 255, .05));
  box-shadow: 0 12px 24px rgba(254, 78, 14, .12);
}

.count {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sideActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.sideActions .logoutBtn {
  grid-column: 1 / -1;
}

.sidebarUtilityZone {
  display: none !important;
}

.btn {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.btn:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06)
}

.btn.primary {
  border-color: rgba(254, 78, 14, .55);
  background: rgba(254, 78, 14, .18);
  box-shadow: 0 16px 36px rgba(254, 78, 14, .14);
}

.btn.primary:hover {
  background: rgba(254, 78, 14, .22)
}

.btn.ghost {
  background: rgba(255, 255, 255, .03)
}

.btn.danger {
  border-color: rgba(255, 59, 48, .55);
  background: rgba(255, 59, 48, .12)
}

.btn.link {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 800;
  text-decoration: underline dotted rgba(255, 255, 255, .35);
}

.btn.link:hover {
  background: transparent;
  text-decoration: underline;
}

.filebtn {
  position: relative;
  overflow: hidden
}

.filebtn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer
}

.sideHint {
  margin-top: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .10));
}

.hintTitle {
  font-weight: 900;
  font-size: 13px
}

.hintText {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.4
}

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

.hintWarn {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}


.main {
  display: grid;
  gap: 14px
}

.card {
  padding: 14px
}

.hidden {
  display: none
}

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap
}

h1 {
  margin: 0;
  font-size: 18px
}

.sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px
}

.headRight {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap
}

#view-newOrder .orderHeroHead {
  position: relative;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(254, 78, 14, .20);
  background:
    radial-gradient(circle at 14% 14%, rgba(254, 78, 14, .20), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(255, 184, 107, .12), transparent 26%),
    linear-gradient(135deg, rgba(254, 78, 14, .14), rgba(255, 255, 255, .03) 38%, rgba(64, 106, 255, .08) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 18px 40px rgba(0, 0, 0, .22),
    0 10px 28px rgba(254, 78, 14, .10);
  overflow: hidden;
}

#view-newOrder .orderHeroHead::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 20px;
  width: 92px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 214, 186, .95), rgba(254, 78, 14, .95));
  box-shadow: 0 0 18px rgba(254, 78, 14, .26);
}

#view-newOrder .orderHeroHead::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0) 72%);
  pointer-events: none;
}

#view-newOrder .orderHeroIntro {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding-top: 18px;
  min-width: min(520px, 100%);
}

#view-newOrder .orderHeroIntro h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: .94;
  letter-spacing: -.04em;
  font-weight: 980;
  color: transparent;
  background: linear-gradient(92deg, #ffffff 0%, #ffe1ce 26%, #ff7b28 72%, #ffcfad 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}

#view-newOrder .orderHeroIntro .sub {
  margin-top: 0;
  max-width: 560px;
  color: rgba(255, 244, 235, .82);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .01em;
}

#view-newOrder .orderHeroHead .headRight {
  position: relative;
  z-index: 1;
}

#view-newOrder .orderHeroHead .btn.ghost {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(10, 12, 18, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

#view-newOrder .orderHeroHead .btn.ghost:hover {
  border-color: rgba(254, 78, 14, .42);
  background: rgba(254, 78, 14, .12);
}

/* ===== New Order - Pro Layout Polish ===== */
#view-newOrder #orderForm {
  display: grid;
  gap: 14px;
}

#view-newOrder .productLayout {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.08fr);
  gap: 14px;
}

#view-newDebt .financeNewLayout,
#view-newPayment .financeNewLayout,
#view-newExpense .productLayout {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.08fr);
  gap: 14px;
}

#view-newCustomer {
  gap: 12px;
}

#view-newCustomer .customerEntryHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 14% 18%, rgba(254, 78, 14, .12), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(77, 124, 254, .10), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

#view-newCustomer .customerEntryHead::before {
  top: 12px;
  left: 18px;
  width: 62px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

#view-newCustomer .customerEntryHead::after {
  width: 118px;
  height: 118px;
  right: -24px;
  bottom: -30px;
  opacity: .52;
}

#view-newCustomer .customerEntryHead>div:first-child {
  display: grid;
  gap: 5px;
  padding-top: 10px;
}

#view-newCustomer .customerEntryHead h1 {
  font-size: clamp(24px, 3vw, 34px);
}

#view-newCustomer .customerEntryHead .sub {
  max-width: 760px;
  color: rgba(255, 244, 235, .76);
}

#view-newCustomer .customerEntryHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.customerEntryHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.customerEntryHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 860;
}

.customerEntryHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.customerEntryHeroPillMuted {
  color: rgba(255, 255, 255, .60);
}

.customerEntryHeroPill.is-alert {
  border-color: rgba(255, 194, 49, .30);
  background: rgba(255, 194, 49, .12);
  color: #fff2cb;
}

#view-newCustomer .customerEntryLayout {
  gap: 14px;
}

#view-newCustomer .customerContextPanel,
#view-newCustomer .customerIdentityPanel {
  grid-column: 1 / -1;
}

#view-newCustomer .productPanel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .10);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(77, 124, 254, .08), rgba(77, 124, 254, 0) 46%),
    radial-gradient(120% 180% at 0% 0%, rgba(254, 78, 14, .10), rgba(254, 78, 14, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 14px 30px rgba(0, 0, 0, .16);
}

#view-newCustomer .productPanel::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 214, 186, .84), rgba(254, 78, 14, .78), rgba(77, 124, 254, .66));
  opacity: .75;
  pointer-events: none;
}

#view-newCustomer .productPanelHead {
  gap: 6px;
}

#view-newCustomer .productPanelHead h3 {
  font-size: 16px;
  letter-spacing: .01em;
}

#view-newCustomer .productPanelHead p {
  font-size: 12.5px;
}

#view-newCustomer .financeFormV2 .field label {
  font-weight: 900;
  letter-spacing: .01em;
}

#view-newCustomer .financeFormV2 .field input,
#view-newCustomer .financeFormV2 .field textarea {
  background: linear-gradient(180deg, rgba(8, 12, 20, .62), rgba(8, 12, 20, .38));
  border-color: rgba(255, 255, 255, .12);
}

#view-newCustomer .financeFormV2 .field input:focus,
#view-newCustomer .financeFormV2 .field textarea:focus {
  border-color: rgba(254, 78, 14, .55);
  box-shadow:
    0 0 0 4px rgba(254, 78, 14, .14),
    0 10px 22px rgba(254, 78, 14, .12);
}

#view-newCustomer .customerNameField input {
  min-height: 50px;
  font-size: 17px;
  font-weight: 850;
}

#view-newCustomer .customerNotesField textarea {
  min-height: 96px;
  resize: vertical;
}

.customerFormSurfaceField {
  gap: 0;
}

.customerEntryContextCard,
.customerDuplicateCard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(77, 124, 254, .10), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .14);
}

.customerEntryContextCard::before,
.customerDuplicateCard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 72px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 221, 195, .92), rgba(254, 78, 14, .86));
}

.customerDuplicateCard {
  margin-top: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(255, 194, 49, .08), transparent 34%);
}

.customerDuplicateCard[data-state="good"] {
  border-color: rgba(52, 199, 89, .18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(52, 199, 89, .10), transparent 34%);
}

.customerDuplicateCard[data-state="good"]::before {
  background: linear-gradient(90deg, rgba(187, 247, 208, .92), rgba(52, 199, 89, .88));
}

.customerDuplicateCard[data-state="warn"] {
  border-color: rgba(255, 194, 49, .18);
}

.customerDuplicateCard[data-state="warn"]::before {
  background: linear-gradient(90deg, rgba(255, 240, 188, .92), rgba(255, 194, 49, .88));
}

.customerDuplicateCard[data-state="danger"] {
  border-color: rgba(255, 99, 99, .18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(255, 99, 99, .10), transparent 34%);
}

.customerDuplicateCard[data-state="danger"]::before {
  background: linear-gradient(90deg, rgba(255, 219, 219, .92), rgba(255, 99, 99, .88));
}

.customerEntryContextTop,
.customerDuplicateTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customerEntryEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.customerEntryContextTitle,
.customerDuplicateTitle {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 940;
  line-height: 1.35;
  color: rgba(255, 255, 255, .92);
}

.customerEntryContextBadge,
.customerDuplicateBadge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.customerEntryContextBadge.good,
.customerDuplicateBadge.good {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #fff;
}

.customerDuplicateBadge.warn {
  border-color: rgba(255, 194, 49, .95);
  background: rgba(255, 194, 49, .95);
  color: rgba(0, 0, 0, .88);
}

.customerDuplicateBadge.danger {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #fff;
}

.customerEntryContextGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customerEntryContextMetric {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .22);
}

.customerEntryContextMetric span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.customerEntryContextMetric b {
  font-size: 14px;
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  line-height: 1.28;
}

.customerEntryContextNote {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.customerDuplicateList {
  display: grid;
  gap: 10px;
}

.customerDuplicateEmpty {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .10);
  background: rgba(8, 12, 20, .18);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.customerDuplicateItem {
  display: grid;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .18);
}

.customerDuplicateIdentity {
  display: grid;
  gap: 4px;
}

.customerDuplicateIdentity strong {
  font-size: 14px;
  line-height: 1.28;
  color: rgba(255, 255, 255, .94);
}

.customerDuplicateIdentity span {
  color: var(--muted);
  font-size: 12.5px;
}

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

.customerDuplicateReason {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 900;
}

.customerDuplicateReason.is-strong {
  border-color: rgba(255, 194, 49, .28);
  background: rgba(255, 194, 49, .12);
  color: #fff2cb;
}

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

.customerFormActionBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customerFormActionMeta {
  flex: 1 1 320px;
  min-width: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  line-height: 1.45;
}

.customerFormActionButtons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.customerFormActionButtons .btn {
  min-height: 42px;
}

#view-newCustomer #customerForm.customerFormV2>.row {
  position: sticky;
  bottom: 8px;
  z-index: 8;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  background: rgba(8, 12, 20, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#view-newDebt {
  gap: 12px;
}

#view-newDebt .debtEntryHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 16%, rgba(254, 78, 14, .14), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(77, 124, 254, .08), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

#view-newDebt .debtEntryHead::before {
  top: 12px;
  left: 18px;
  width: 62px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

#view-newDebt .debtEntryHead::after {
  width: 118px;
  height: 118px;
  right: -24px;
  bottom: -30px;
  opacity: .54;
}

#view-newDebt .productHeroIntro {
  gap: 5px;
  padding-top: 10px;
}

#view-newDebt .productHeroIntro .productHeroEyebrow {
  order: 1;
}

#view-newDebt .productHeroIntro h1 {
  order: 2;
  font-size: clamp(24px, 3vw, 34px);
}

#view-newDebt .productHeroIntro .sub {
  order: 3;
  max-width: 760px;
  color: rgba(255, 244, 235, .76);
}

#view-newDebt .debtEntryHeroMeta {
  order: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#view-newDebt .debtEntryHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

#view-newDebt .subsHeroSearch {
  display: none;
}

.debtEntryHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 860;
}

.debtEntryHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.debtEntryHeroPillMuted {
  color: rgba(255, 255, 255, .60);
}

.debtFormSurfaceField {
  gap: 0;
}

.debtClientContextCard,
.debtQuickSummaryCard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(77, 124, 254, .10), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .14);
}

.debtClientContextCard::before,
.debtQuickSummaryCard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 72px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 221, 195, .92), rgba(254, 78, 14, .86));
}

.debtQuickSummaryCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(52, 199, 89, .10), transparent 34%);
}

.debtQuickSummaryCard::before {
  background: linear-gradient(90deg, rgba(187, 247, 208, .92), rgba(52, 199, 89, .88));
}

.debtContextTop,
.debtSummaryTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.debtContextEyebrow,
.debtSummaryEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.debtContextTitle,
.debtSummaryTitle {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 940;
  line-height: 1.35;
  color: rgba(255, 255, 255, .92);
}

.debtContextBadge,
.debtSummaryBadge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.debtContextBadge.is-alert,
.debtSummaryBadge.danger {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #fff;
}

.debtSummaryBadge.warn {
  border-color: rgba(255, 194, 49, .95);
  background: rgba(255, 194, 49, .95);
  color: rgba(0, 0, 0, .88);
}

.debtSummaryBadge.good {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #fff;
}

.debtContextGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.debtSummaryGrid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.debtContextMetric,
.debtSummaryItem {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .12);
}

.debtSummaryItemPrimary {
  background:
    radial-gradient(circle at top right, rgba(52, 199, 89, .12), transparent 36%),
    rgba(0, 0, 0, .12);
  border-color: rgba(52, 199, 89, .18);
}

.debtContextMetric span,
.debtSummaryItem span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.debtContextMetric b,
.debtSummaryItem b {
  font-size: 14px;
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  line-height: 1.25;
}

.debtSummaryItemPrimary b {
  font-size: 22px;
  letter-spacing: -.04em;
}

.debtContextNote,
.debtSummaryNote {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

#view-newDebt .financeFormV2 .productPanelHead h3 {
  font-size: 16px;
}

#view-newDebt .financeFormV2 .productPanelHead p {
  font-size: 12.5px;
}

#view-newDebt .financeFormV2 .field label {
  font-weight: 900;
  letter-spacing: .01em;
}

#view-newDebt .financeFormV2 .field input,
#view-newDebt .financeFormV2 .field select,
#view-newDebt .financeFormV2 .field textarea {
  background: linear-gradient(180deg, rgba(8, 12, 20, .62), rgba(8, 12, 20, .38));
  border-color: rgba(255, 255, 255, .12);
}

#view-newDebt .financeFormV2 .field input:focus,
#view-newDebt .financeFormV2 .field select:focus,
#view-newDebt .financeFormV2 .field textarea:focus {
  border-color: rgba(254, 78, 14, .55);
  box-shadow:
    0 0 0 4px rgba(254, 78, 14, .14),
    0 10px 22px rgba(254, 78, 14, .12);
}

.debtFormActionBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.debtFormActionMeta {
  flex: 1 1 320px;
  min-width: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  line-height: 1.45;
}

.debtFormActionButtons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.debtFormActionButtons .btn {
  min-height: 42px;
}

#view-newPayment {
  gap: 12px;
}

#view-newPayment .paymentEntryHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 14% 18%, rgba(254, 78, 14, .12), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(77, 124, 254, .12), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

#view-newPayment .paymentEntryHead::before {
  top: 12px;
  left: 18px;
  width: 62px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

#view-newPayment .paymentEntryHead::after {
  width: 118px;
  height: 118px;
  right: -24px;
  bottom: -30px;
  opacity: .52;
}

#view-newPayment .paymentEntryHead>div:first-child {
  display: grid;
  gap: 5px;
  padding-top: 10px;
}

#view-newPayment .paymentEntryHead h1 {
  font-size: clamp(24px, 3vw, 34px);
}

#view-newPayment .paymentEntryHead .sub {
  max-width: 760px;
  color: rgba(255, 244, 235, .76);
}

#view-newPayment .paymentEntryHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

#view-newPayment .paymentEntryHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.paymentEntryHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 860;
}

.paymentEntryHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.paymentEntryHeroPillMuted {
  color: rgba(255, 255, 255, .60);
}

.paymentFormSurfaceField {
  gap: 0;
}

.paymentClientContextCard,
.paymentLinkContextCard,
.paymentQuickSummaryCard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(77, 124, 254, .10), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .14);
}

.paymentClientContextCard::before,
.paymentLinkContextCard::before,
.paymentQuickSummaryCard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  width: 72px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 221, 195, .92), rgba(254, 78, 14, .86));
}

.paymentLinkContextCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(77, 124, 254, .14), transparent 34%);
}

.paymentLinkContextCard::before {
  background: linear-gradient(90deg, rgba(186, 218, 255, .92), rgba(77, 124, 254, .88));
}

.paymentQuickSummaryCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at top right, rgba(52, 199, 89, .12), transparent 34%);
}

.paymentQuickSummaryCard::before {
  background: linear-gradient(90deg, rgba(187, 247, 208, .92), rgba(52, 199, 89, .88));
}

.paymentContextTop,
.paymentSummaryTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.paymentContextEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.paymentContextTitle {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 940;
  line-height: 1.35;
  color: rgba(255, 255, 255, .92);
}

.paymentContextBadge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.paymentContextBadge.good {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #fff;
}

.paymentContextBadge.warn {
  border-color: rgba(255, 194, 49, .95);
  background: rgba(255, 194, 49, .95);
  color: rgba(0, 0, 0, .88);
}

.paymentContextBadge.danger {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #fff;
}

.paymentContextGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.paymentLinkGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.paymentSummaryGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.paymentContextMetric,
.paymentSummaryItem {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .22);
}

.paymentContextMetric span,
.paymentSummaryItem span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.paymentContextMetric b,
.paymentSummaryItem b {
  font-size: 14px;
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  line-height: 1.28;
}

.paymentSummaryItemPrimary b {
  font-size: 22px;
  letter-spacing: -.04em;
}

.paymentSummaryItemPrimary {
  grid-column: span 2;
}

.paymentContextNote {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

#view-newPayment .financeFormV2 .productPanelHead h3 {
  font-size: 16px;
}

#view-newPayment .financeFormV2 .productPanelHead p {
  font-size: 12.5px;
}

#view-newPayment .financeFormV2 .field label {
  font-weight: 900;
  letter-spacing: .01em;
}

#view-newPayment .financeFormV2 .field input,
#view-newPayment .financeFormV2 .field select,
#view-newPayment .financeFormV2 .field textarea {
  background: linear-gradient(180deg, rgba(8, 12, 20, .62), rgba(8, 12, 20, .38));
  border-color: rgba(255, 255, 255, .12);
}

#view-newPayment .financeFormV2 .field input:focus,
#view-newPayment .financeFormV2 .field select:focus,
#view-newPayment .financeFormV2 .field textarea:focus {
  border-color: rgba(77, 124, 254, .48);
  box-shadow:
    0 0 0 4px rgba(77, 124, 254, .14),
    0 10px 22px rgba(77, 124, 254, .12);
}

#view-newPayment .paymentNoteField {
  opacity: .96;
}

#view-newPayment .paymentNoteField textarea {
  min-height: 96px;
  resize: vertical;
}

.paymentFormActionBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.paymentFormActionMeta {
  flex: 1 1 320px;
  min-width: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  line-height: 1.45;
}

.paymentFormActionButtons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.paymentFormActionButtons .btn {
  min-height: 42px;
}

#view-newOrder .productPanel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .10);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(77, 124, 254, .10), rgba(77, 124, 254, 0) 45%),
    radial-gradient(120% 180% at 0% 0%, rgba(254, 78, 14, .10), rgba(254, 78, 14, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 14px 30px rgba(0, 0, 0, .16);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

#view-newOrder .productPanel::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 214, 186, .84), rgba(254, 78, 14, .78), rgba(77, 124, 254, .66));
  opacity: .75;
  pointer-events: none;
}

#view-newOrder .productPanel:hover {
  transform: translateY(-1px);
  border-color: rgba(254, 78, 14, .26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 20px 34px rgba(0, 0, 0, .20);
}

#view-newOrder .productPanelHead {
  gap: 6px;
}

#view-newOrder .productPanelHead h3 {
  font-size: 16px;
  letter-spacing: .01em;
}

#view-newOrder .productPanelHead p {
  font-size: 12.5px;
}

#view-newOrder .field label {
  font-weight: 900;
  letter-spacing: .01em;
}

#view-newOrder .field input,
#view-newOrder .field select,
#view-newOrder .field textarea {
  background: linear-gradient(180deg, rgba(8, 12, 20, .62), rgba(8, 12, 20, .38));
  border-color: rgba(255, 255, 255, .12);
}

#view-newOrder .field input:focus,
#view-newOrder .field select:focus,
#view-newOrder .field textarea:focus {
  border-color: rgba(254, 78, 14, .55);
  box-shadow:
    0 0 0 4px rgba(254, 78, 14, .14),
    0 10px 22px rgba(254, 78, 14, .12);
}

#view-newOrder .orderItemsList {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, .16);
}

#view-newOrder .depositCard {
  border-color: rgba(255, 255, 255, .12);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(77, 124, 254, .08), rgba(77, 124, 254, 0) 48%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .018));
}

#view-newOrder #orderForm>.row {
  position: sticky;
  bottom: 8px;
  z-index: 8;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  background: rgba(8, 12, 20, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#view-newDebt #debtForm.financeFormV2>.row,
#view-newPayment #paymentForm.financeFormV2>.row,
#view-newExpense #expenseForm.financeFormV2>.row {
  position: sticky;
  bottom: 8px;
  z-index: 8;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  background: rgba(8, 12, 20, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#view-dashboard>.head {
  display: none;
}

.productHeroHead {
  position: relative;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(254, 78, 14, .18);
  background:
    radial-gradient(circle at 12% 16%, rgba(254, 78, 14, .18), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(255, 255, 255, .08), transparent 26%),
    linear-gradient(135deg, rgba(254, 78, 14, .12), rgba(255, 255, 255, .03) 44%, rgba(77, 124, 254, .08) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 18px 40px rgba(0, 0, 0, .22);
  overflow: hidden;
}

.productHeroHead::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 16px;
  width: 88px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 221, 195, .95), rgba(254, 78, 14, .95));
  box-shadow: 0 0 20px rgba(254, 78, 14, .24);
}

.productHeroHead::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 78, 14, .16), rgba(254, 78, 14, 0) 72%);
  pointer-events: none;
}

.productHeroIntro {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding-top: 18px;
  min-width: min(540px, 100%);
}

.productHeroIntro h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: .95;
  letter-spacing: -.04em;
  font-weight: 980;
  color: transparent;
  background: linear-gradient(92deg, #ffffff 0%, #ffe1ce 28%, #ff7b28 72%, #ffcfad 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.productHeroEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 240, 229, .72);
}

.productHeroIntro .sub {
  margin-top: 0;
  max-width: 620px;
  color: rgba(255, 244, 235, .82);
  font-size: 13px;
  line-height: 1.5;
}

.productHeroHead .headRight {
  position: relative;
  z-index: 1;
}

.productHeroHead .btn.ghost {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(10, 12, 18, .24);
}

.moduleViewShell {
  display: grid;
  gap: 14px;
}

.moduleViewShell.hidden,
.view.hidden {
  display: none !important;
}

.moduleViewShell>* {
  min-width: 0;
}

.moduleViewShell>.moduleHeroHead {
  margin-bottom: 0;
}

.moduleViewShell>.moduleHeroHead .productHeroIntro {
  min-width: min(480px, 100%);
}

.moduleViewShell>.moduleHeroHead .productHeroIntro h1 {
  font-size: clamp(26px, 3.8vw, 38px);
}

.moduleViewShell>.moduleHeroHead .headRight {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.moduleViewShell>.moduleChips {
  margin-top: 0;
}

.moduleProLayout {
  gap: 12px;
}

.moduleProLayout>.moduleHeroHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  grid-auto-rows: min-content;
  align-items: start;
  align-content: start;
  gap: 14px 18px;
  padding: 16px 18px;
  min-height: 0;
  height: auto;
}

.moduleProLayout>.moduleHeroHead>* {
  min-width: 0;
}

.moduleProLayout>.moduleHeroHead::after {
  width: 150px;
  height: 150px;
  right: -36px;
  bottom: -52px;
  opacity: .78;
}

.moduleProLayout>.moduleHeroHead .productHeroIntro {
  min-width: 0;
  width: 100%;
  max-width: 760px;
  padding-top: 14px;
  gap: 6px;
}

.moduleProLayout>.moduleHeroHead .productHeroIntro h1 {
  font-size: clamp(28px, 3vw, 44px);
}

.moduleProLayout>.moduleHeroHead .productHeroIntro .sub {
  max-width: 680px;
}

.moduleProLayout>.moduleHeroHead .headRight {
  justify-self: end;
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
}

.moduleProLayout>.moduleHeroHead .headRight .search {
  width: auto;
  max-width: none;
  flex: 1 1 280px;
  min-width: 0;
}

.moduleProLayout>.moduleHeroHead .headRight .btn {
  white-space: nowrap;
}

.moduleProLayout>.moduleHeroHead .invTools {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.moduleProLayout>.moduleChips {
  margin-top: 0;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.moduleProLayout>.moduleTableSurface {
  padding: 0;
  border-radius: 18px;
  border-color: rgba(255, 255, 255, .10);
}

.moduleProLayout>.moduleTableSurface .table {
  min-width: 960px;
}

.moduleProLayout>.moduleTableSurface .table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(16, 22, 34, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.moduleProLayout>.moduleTableSurface .table th,
.moduleProLayout>.moduleTableSurface .table td {
  padding: 12px 14px;
}

.moduleProLayout>.moduleTableSurface .table td {
  color: rgba(255, 255, 255, .90);
}

.moduleProLayout>.moduleTableSurface .table tr:hover td {
  background: rgba(255, 255, 255, .045);
}

.moduleSurface {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 12%, rgba(254, 78, 14, .08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 34px rgba(0, 0, 0, .18);
}

.moduleViewShell>.moduleSurface {
  margin-top: 0;
}

.moduleMotionSurface {
  position: relative;
  border-color: rgba(255, 255, 255, .10);
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(77, 124, 254, .10), rgba(77, 124, 254, 0) 45%),
    radial-gradient(120% 180% at 0% 0%, rgba(254, 78, 14, .10), rgba(254, 78, 14, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 14px 30px rgba(0, 0, 0, .16);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.moduleMotionSurface::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 214, 186, .84), rgba(254, 78, 14, .78), rgba(77, 124, 254, .66));
  opacity: .75;
  pointer-events: none;
}

.moduleMotionSurface:hover {
  transform: translateY(-1px);
  border-color: rgba(254, 78, 14, .26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 20px 34px rgba(0, 0, 0, .20);
}

.moduleTableSurface.moduleMotionSurface {
  overflow: auto;
}

#view-expenses .expenseStatCard,
#view-expenses .expenseItem,
#view-products .invPill {
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

#view-expenses .expenseStatCard:hover,
#view-expenses .expenseItem:hover,
#view-products .invPill:hover {
  transform: translateY(-1px);
  border-color: rgba(254, 78, 14, .26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 20px 34px rgba(0, 0, 0, .20);
}

@media (prefers-reduced-motion: reduce) {

  .moduleMotionSurface,
  #view-expenses .expenseStatCard,
  #view-expenses .expenseItem,
  #view-products .invPill {
    transition: none;
  }

  .moduleMotionSurface:hover,
  #view-expenses .expenseStatCard:hover,
  #view-expenses .expenseItem:hover,
  #view-products .invPill:hover {
    transform: none;
  }
}

.moduleTableSurface {
  overflow: auto;
}

.moduleTableSurface .table {
  background: transparent;
}

.moduleTableSurface .table th {
  color: rgba(255, 255, 255, .82);
}

.moduleTableSurface .table td {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.moduleTableSurface .table tr:hover td {
  background: rgba(255, 255, 255, .035);
}

.moduleFormShell {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.moduleGridCard {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 10% 12%, rgba(254, 78, 14, .08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 34px rgba(0, 0, 0, .16);
}

.moduleGridCard .field.span2 .panel {
  border-radius: 16px;
}

.moduleLayoutSurface {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.moduleStatsSurface {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 12%, rgba(254, 78, 14, .08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 34px rgba(0, 0, 0, .16);
  padding: 12px;
}

.moduleFormActions {
  margin-top: 0;
  padding: 2px 4px 0;
}

@media (max-width: 760px) {
  .moduleViewShell>.moduleHeroHead {
    padding: 16px;
    border-radius: 18px;
  }

  .moduleViewShell>.moduleHeroHead .productHeroIntro {
    min-width: 0;
    width: 100%;
  }

  .moduleGridCard {
    padding: 14px;
  }
}

@media (max-width: 1180px) {
  .moduleProLayout>.moduleHeroHead {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .moduleProLayout>.moduleHeroHead .headRight {
    justify-self: stretch;
    max-width: none;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .moduleProLayout>.moduleHeroHead .headRight .search {
    flex: 1 1 260px;
  }
}

@media (max-width: 760px) {
  .moduleProLayout>.moduleHeroHead {
    padding: 14px;
    border-radius: 18px;
  }

  .moduleProLayout>.moduleHeroHead .productHeroIntro {
    padding-top: 12px;
  }

  .moduleProLayout>.moduleHeroHead .productHeroIntro h1 {
    font-size: 30px;
  }

  .moduleProLayout>.moduleChips {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .moduleProLayout>.moduleChips::-webkit-scrollbar {
    display: none;
  }
}

.productModeGuide {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.productGuideCard {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
  min-width: 0;
  transition: border-color .16s ease, transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.productGuideCard strong {
  font-size: 13px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.productGuideCard span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.productGuideCard[data-active="1"] {
  border-color: rgba(254, 78, 14, .34);
  background: linear-gradient(180deg, rgba(254, 78, 14, .14), rgba(255, 255, 255, .035));
  box-shadow: 0 12px 26px rgba(254, 78, 14, .10);
  transform: translateY(-1px);
}

.productFormV2 {
  margin-top: 16px;
}

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

.productPanel {
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.productPanelHead {
  display: grid;
  gap: 4px;
}

.productPanelHead h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
}

.productPanelHead p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.productPanelNote {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.productTogglePanel {
  position: relative;
}

.productTogglePanel[data-active="1"] {
  border-color: rgba(254, 78, 14, .28);
  background:
    radial-gradient(circle at 14% 12%, rgba(254, 78, 14, .10), transparent 34%),
    linear-gradient(180deg, rgba(254, 78, 14, .08), rgba(255, 255, 255, .03));
  box-shadow: 0 18px 36px rgba(254, 78, 14, .08);
}

.productToggleHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.productToggleSwitch {
  flex: 0 0 min(100%, 420px);
  justify-content: flex-start;
}

.productToggleSwitch b {
  color: rgba(255, 255, 255, .95);
}

.productBundleRows {
  display: grid;
  gap: 10px;
}

.productBundleRows .row {
  margin-top: 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  align-items: center;
}

.productBundleRows .row select,
.productBundleRows .row input {
  min-height: 42px;
}

.productBundleInfo {
  border-top: 1px dashed rgba(255, 255, 255, .10);
  padding-top: 10px;
}

.productFormActions {
  margin-top: 14px;
}

.newProductHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
}

.newProductHead::before {
  top: 12px;
  left: 18px;
  width: 62px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

.newProductHead::after {
  width: 128px;
  height: 128px;
  right: -22px;
  bottom: -32px;
  opacity: .5;
}

#view-newProduct .newProductHead .productHeroIntro {
  gap: 5px;
  padding-top: 10px;
}

#view-newProduct .newProductHead h1 {
  font-size: clamp(24px, 3vw, 34px);
}

#view-newProduct .newProductHead .sub {
  max-width: 780px;
}

.newProductHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.productEntryHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.productEntryHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 860;
}

.productEntryHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.productEntryHeroPillMuted {
  color: rgba(255, 255, 255, .60);
}

.productModeSwitch .productGuideCard {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.productModeSwitch .productGuideCard[data-active="1"] {
  border-color: rgba(254, 78, 14, .34);
  background:
    radial-gradient(circle at 84% 14%, rgba(254, 78, 14, .12), transparent 24%),
    linear-gradient(180deg, rgba(254, 78, 14, .16), rgba(255, 255, 255, .035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 16px 28px rgba(254, 78, 14, .10);
  transform: translateY(-1px);
}

.productModeSwitch .productGuideCard[data-product-mode="service"][data-active="1"] {
  border-color: rgba(77, 124, 254, .30);
  background:
    radial-gradient(circle at 84% 14%, rgba(77, 124, 254, .14), transparent 24%),
    linear-gradient(180deg, rgba(77, 124, 254, .14), rgba(255, 255, 255, .035));
  box-shadow: 0 16px 28px rgba(77, 124, 254, .10);
}

.productModeSwitch .productGuideCard[data-product-mode="subscription"][data-active="1"] {
  border-color: rgba(52, 199, 89, .28);
  background:
    radial-gradient(circle at 84% 14%, rgba(52, 199, 89, .16), transparent 24%),
    linear-gradient(180deg, rgba(52, 199, 89, .14), rgba(255, 255, 255, .035));
  box-shadow: 0 16px 28px rgba(52, 199, 89, .10);
}

.productModeSwitch .productGuideCard[data-product-mode="bundle"][data-active="1"] {
  border-color: rgba(255, 194, 49, .30);
  background:
    radial-gradient(circle at 84% 14%, rgba(255, 194, 49, .16), transparent 24%),
    linear-gradient(180deg, rgba(255, 194, 49, .14), rgba(255, 255, 255, .035));
  box-shadow: 0 16px 28px rgba(255, 194, 49, .10);
}

#view-newProduct .newProductLayout {
  align-items: start;
}

#view-newProduct .productIdentityPanel,
#view-newProduct .productSummaryPanel,
#view-newProduct .productBundlePanel {
  grid-column: 1 / -1;
}

#view-newProduct .productPricingPanel[data-tone="pricing"] {
  border-color: rgba(77, 124, 254, .20);
  background:
    radial-gradient(circle at 86% 12%, rgba(77, 124, 254, .10), transparent 24%),
    linear-gradient(180deg, rgba(77, 124, 254, .05), rgba(255, 255, 255, .02));
}

#view-newProduct .productPricingPanel[data-tone="subscription"] {
  border-color: rgba(52, 199, 89, .20);
  background:
    radial-gradient(circle at 86% 12%, rgba(52, 199, 89, .10), transparent 24%),
    linear-gradient(180deg, rgba(52, 199, 89, .05), rgba(255, 255, 255, .02));
}

#view-newProduct .productPricingPanel[data-tone="bundle"] {
  border-color: rgba(255, 194, 49, .20);
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 194, 49, .10), transparent 24%),
    linear-gradient(180deg, rgba(255, 194, 49, .05), rgba(255, 255, 255, .02));
}

#view-newProduct .productPricingPanel[data-tone="service"] {
  border-color: rgba(77, 124, 254, .20);
}

#view-newProduct .productInventoryPanel[data-tone="inventory"] {
  border-color: rgba(254, 78, 14, .18);
}

#view-newProduct .productInventoryPanel[data-tone="bundle"] {
  border-color: rgba(255, 194, 49, .20);
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 194, 49, .10), transparent 24%),
    linear-gradient(180deg, rgba(255, 194, 49, .05), rgba(255, 255, 255, .02));
}

#view-newProduct .productBehaviorPanel {
  border-color: rgba(255, 255, 255, .10);
}

.productBehaviorSummary {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .18);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.productAdaptiveHidden {
  display: none !important;
}

.productBundleBuilderHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .18);
}

.productBundleBuilderHead span:first-child {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .74);
}

.productBundleBuilderMeta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.productBundleRows {
  margin-top: 8px;
}

.productBundleRow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 6px 0;
}

.productBundleSelect {
  flex: 1;
}

.productBundleQty {
  width: 90px;
}

.productBundleInfo {
  margin-top: 8px;
  color: rgba(255, 255, 255, .65);
}

.productBundleInfoLine {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.productBundleWarnBadge {
  margin-left: 6px;
}

.productBundleInfoMeta {
  margin-top: 4px;
  color: rgba(255, 255, 255, .55);
}

.productBundleActions {
  gap: 10px;
}

.productConfigSummaryGrid {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.productConfigSummaryItem {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .18);
}

.productConfigSummaryItemPrimary {
  grid-column: span 2;
  background:
    radial-gradient(circle at top right, rgba(254, 78, 14, .12), transparent 36%),
    rgba(8, 12, 20, .18);
  border-color: rgba(254, 78, 14, .18);
}

.productConfigSummaryItem span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.productConfigSummaryItem b {
  font-size: 14px;
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  line-height: 1.28;
}

.productConfigSummaryItemPrimary b {
  font-size: 22px;
  letter-spacing: -.04em;
}

.productConfigSummaryItem small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.productConfigSummaryItem .is-good {
  color: #d7ffe5;
}

.productConfigSummaryItem .is-warn {
  color: #ffd8d8;
}

.productConfigSummaryEmpty {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .10);
  background: rgba(8, 12, 20, .18);
  color: var(--muted);
  font-size: 12.5px;
}

.productEntryActionBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.productEntryActionMeta {
  flex: 1 1 320px;
  min-width: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  line-height: 1.45;
}

.productEntryActionButtons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.productEntryActionButtons .btn {
  min-height: 42px;
}

#view-newProduct #productForm>.row {
  position: sticky;
  bottom: 8px;
  z-index: 8;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  background: rgba(8, 12, 20, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --- Stock Requests Dashboard --- */
#view-stock {
  position: relative;
}

#view-stock .stockHero {
  padding: 18px 20px;
}

#view-stock .stockHero .sub {
  max-width: 720px;
}

#view-stock .stockHero .headRight {
  display: grid;
  gap: 12px;
  align-content: start;
}

.stockHeroSearch {
  display: grid;
  gap: 6px;
  width: min(440px, 100%);
}

.stockHeroSearch label {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 240, 229, .68);
}

.stockHeroSearch .search {
  width: 100%;
  max-width: none;
  min-height: 50px;
  background: linear-gradient(180deg, rgba(8, 12, 20, .80), rgba(8, 12, 20, .58));
  border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.stockHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stockHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(8, 12, 20, .36);
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
}

.stockHeroPill b {
  font-weight: 980;
  color: rgba(255, 255, 255, .96);
}

.stockHeroPillMuted {
  color: rgba(255, 255, 255, .68);
}

.stockOverviewGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stockKpiCard {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  justify-content: space-between;
  border-color: rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(6, 8, 14, .28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.stockKpiCard::after {
  content: "";
  position: absolute;
  inset: auto -30px -56px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 78, 14, .14), rgba(254, 78, 14, 0) 72%);
  pointer-events: none;
}

.stockKpiCard[data-tone="pending"]::after {
  background: radial-gradient(circle, rgba(255, 204, 0, .16), rgba(255, 204, 0, 0) 72%);
}

.stockKpiCard[data-tone="ordered"]::after {
  background: radial-gradient(circle, rgba(77, 124, 254, .16), rgba(77, 124, 254, 0) 72%);
}

.stockKpiCard[data-tone="done"]::after {
  background: radial-gradient(circle, rgba(52, 199, 89, .16), rgba(52, 199, 89, 0) 72%);
}

.stockKpiTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stockKpiLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.stockKpiValue {
  margin-top: 10px;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 990;
  color: rgba(255, 255, 255, .96);
}

.stockKpiMetaTag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.stockKpiHint {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .74);
}

.stockToolbarPanel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  gap: 14px;
  border-color: rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(6, 10, 16, .22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .14);
}

.stockToolbarPanel::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(254, 78, 14, .36), rgba(255, 255, 255, 0));
}

.stockToolbarGrid {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(220px, .8fr) minmax(240px, .9fr) auto;
  gap: 12px;
  align-items: end;
}

.stockToolbarGrid .field {
  margin: 0;
}

.stockToolbarGrid label {
  font-weight: 900;
}

.stockToolbarSearchField .search,
.stockToolbarSortField select {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, rgba(8, 12, 20, .76), rgba(8, 12, 20, .54));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.stockToggle {
  min-height: 48px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(5, 8, 14, .32);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.stockToggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.stockToggle span {
  display: grid;
  gap: 3px;
}

.stockToggle strong {
  font-size: 13px;
  line-height: 1.15;
  color: rgba(255, 255, 255, .92);
}

.stockToggle small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.stockToolbarActions {
  display: flex;
  justify-content: flex-end;
}

.stockToolbarActions .btn {
  min-height: 48px;
}

.stockSegmented {
  margin-top: 0;
  padding: 4px;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .028);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.stockSegmented .chip {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, .74);
  background: transparent;
  border-color: transparent;
}

.stockSegmented .chip:hover {
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .92);
}

.stockSegmented .chip.active {
  color: #fff;
  border-color: rgba(254, 78, 14, .28);
  background: linear-gradient(180deg, rgba(254, 78, 14, .22), rgba(254, 78, 14, .12));
  box-shadow: 0 10px 22px rgba(254, 78, 14, .12);
}

.stockResultsMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.stockResultsMeta b {
  color: rgba(255, 255, 255, .94);
}

.stockResultsFlag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 59, 48, .26);
  background: rgba(255, 59, 48, .14);
  color: rgba(255, 255, 255, .86);
}

.stockTableWrap {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(7, 10, 16, .22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 16px 32px rgba(0, 0, 0, .16);
}

.stockDesktopTable {
  overflow: auto;
}

#view-stock #stockTable {
  min-width: 1220px;
}

#view-stock #stockTable th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 16px;
  background: rgba(13, 18, 28, .96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .70);
}

#view-stock #stockTable td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

#view-stock #stockTable tr:hover td {
  background: rgba(255, 255, 255, .035);
}

.stockCustomerCell,
.stockRequestCell,
.stockLocationCell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.stockCustomerName,
.stockRequestTitle {
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  line-height: 1.2;
}

.stockCustomerPhone,
.stockRequestNote,
.stockUpdatedHint {
  font-size: 12px;
  color: var(--muted);
}

.stockRequestNote {
  max-width: 320px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stockLocationLine {
  font-weight: 900;
  color: rgba(255, 255, 255, .90);
}

.stockCountryPill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 850;
}

.stockPrice {
  font-weight: 980;
  font-size: 14px;
  color: rgba(255, 255, 255, .94);
  white-space: nowrap;
}

.stockUpdated {
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
}

.stockActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 250px;
}

.stockActions .btn {
  white-space: nowrap;
}

.stockTableRow[data-priority="URGENT"] .stockRequestTitle {
  color: #ffd2c2;
}

.stockEmptyState {
  padding: 18px;
}

.stockEmptyCard {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .16));
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.stockEmptyEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 214, 186, .76);
}

.stockEmptyCard h3 {
  margin: 12px 0 8px;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 990;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .96);
}

.stockEmptyCard p {
  margin: 0 auto;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.stockEmptyActions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.stockCards {
  display: none;
  padding: 14px;
  gap: 12px;
}

.stockCard {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.stockCardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stockCardIdentity {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.stockCardName {
  font-size: 15px;
  font-weight: 980;
  color: rgba(255, 255, 255, .95);
}

.stockCardPhone,
.stockCardLocation,
.stockCardNote {
  font-size: 12.5px;
  color: var(--muted);
}

.stockCardRequest {
  font-size: 14px;
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  line-height: 1.35;
}

.stockCardNote {
  line-height: 1.45;
}

.stockCardMetaGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stockCardMetaItem {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.stockCardMetaItem span {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.stockCardMetaItem b {
  font-size: 13px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.stockCardActions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stockCardActions::-webkit-scrollbar {
  display: none;
}

.stockCardActions .btn {
  white-space: nowrap;
}

html[data-theme="light"] #view-stock .stockKpiCard,
html[data-theme="light"] #view-stock .stockToolbarPanel,
html[data-theme="light"] #view-stock .stockTableWrap,
html[data-theme="light"] #view-stock .stockCard,
html[data-theme="light"] #view-stock .stockEmptyCard {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
}

html[data-theme="light"] #view-stock .stockHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-stock .stockHeroPill b,
html[data-theme="light"] #view-stock .stockCustomerName,
html[data-theme="light"] #view-stock .stockRequestTitle,
html[data-theme="light"] #view-stock .stockLocationLine,
html[data-theme="light"] #view-stock .stockPrice,
html[data-theme="light"] #view-stock .stockUpdated,
html[data-theme="light"] #view-stock .stockCardName,
html[data-theme="light"] #view-stock .stockCardRequest,
html[data-theme="light"] #view-stock .stockCardMetaItem b,
html[data-theme="light"] #view-stock .stockEmptyCard h3 {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-stock .stockHeroPillMuted,
html[data-theme="light"] #view-stock .stockHeroSearch label,
html[data-theme="light"] #view-stock .stockKpiLabel,
html[data-theme="light"] #view-stock .stockKpiHint,
html[data-theme="light"] #view-stock .stockResultsMeta,
html[data-theme="light"] #view-stock .stockCustomerPhone,
html[data-theme="light"] #view-stock .stockRequestNote,
html[data-theme="light"] #view-stock .stockUpdatedHint,
html[data-theme="light"] #view-stock .stockCardPhone,
html[data-theme="light"] #view-stock .stockCardLocation,
html[data-theme="light"] #view-stock .stockCardNote,
html[data-theme="light"] #view-stock .stockCardMetaItem span,
html[data-theme="light"] #view-stock .stockEmptyCard p {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] #view-stock .stockCountryPill,
html[data-theme="light"] #view-stock .stockCardMetaItem,
html[data-theme="light"] #view-stock .stockToggle {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .96);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-stock .stockToolbarSearchField .search,
html[data-theme="light"] #view-stock .stockToolbarSortField select,
html[data-theme="light"] #view-stock .stockHeroSearch .search {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(11, 18, 32, .10);
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-stock .stockSegmented {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .90);
}

html[data-theme="light"] #view-stock .stockSegmented .chip {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] #view-stock .stockSegmented .chip.active {
  color: rgba(11, 18, 32, .92);
  border-color: rgba(254, 78, 14, .18);
  background: rgba(254, 78, 14, .14);
  box-shadow: none;
}

html[data-theme="light"] #view-stock .stockResultsFlag {
  color: rgba(11, 18, 32, .86);
}

html[data-theme="light"] #view-stock #stockTable th {
  background: rgba(245, 247, 251, .98);
  color: rgba(11, 18, 32, .68);
}

html[data-theme="light"] #view-stock #stockTable td {
  border-bottom: 1px solid rgba(11, 18, 32, .08);
}

html[data-theme="light"] #view-stock #stockTable tr:hover td {
  background: rgba(11, 18, 32, .03);
}

/* --- Debts Dashboard --- */
#view-debts {
  position: relative;
}

#view-debts .debtHero {
  padding: 18px 20px;
}

#view-debts .debtHero .sub {
  max-width: 720px;
}

#view-debts .debtHero .headRight {
  display: grid;
  gap: 12px;
  align-content: start;
}

.debtHeroSearch {
  display: grid;
  gap: 6px;
  width: min(440px, 100%);
}

.debtHeroSearch label {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 240, 229, .68);
}

.debtHeroSearch .search {
  width: 100%;
  max-width: none;
  min-height: 50px;
  background: linear-gradient(180deg, rgba(8, 12, 20, .80), rgba(8, 12, 20, .58));
  border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.debtHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.debtHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(8, 12, 20, .36);
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
}

.debtHeroPill b {
  font-weight: 980;
  color: rgba(255, 255, 255, .96);
}

.debtHeroPillMuted {
  color: rgba(255, 255, 255, .68);
}

.debtOverviewGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.debtKpiCard {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  justify-content: space-between;
  border-color: rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(6, 8, 14, .28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.debtKpiCard::after {
  content: "";
  position: absolute;
  inset: auto -30px -56px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 78, 14, .14), rgba(254, 78, 14, 0) 72%);
  pointer-events: none;
}

.debtKpiCard[data-tone="overdue"]::after {
  background: radial-gradient(circle, rgba(255, 59, 48, .16), rgba(255, 59, 48, 0) 72%);
}

.debtKpiCard[data-tone="money"]::after {
  background: radial-gradient(circle, rgba(77, 124, 254, .16), rgba(77, 124, 254, 0) 72%);
}

.debtKpiCard[data-tone="closed"]::after {
  background: radial-gradient(circle, rgba(52, 199, 89, .16), rgba(52, 199, 89, 0) 72%);
}

.debtKpiTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.debtKpiLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.debtKpiValue {
  margin-top: 10px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 990;
  color: rgba(255, 255, 255, .96);
}

.debtKpiMetaTag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.debtKpiHint {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .74);
}

.debtToolbarPanel {
  position: relative;
  overflow: hidden;
  padding: 16px;
  gap: 14px;
  border-color: rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(6, 10, 16, .22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .14);
}

.debtToolbarPanel::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(254, 78, 14, .36), rgba(255, 255, 255, 0));
}

.debtToolbarGrid {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(220px, .8fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.debtToolbarGrid .field {
  margin: 0;
}

.debtToolbarGrid label {
  font-weight: 900;
}

.debtToolbarSearchField .search,
.debtToolbarSortField select {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, rgba(8, 12, 20, .76), rgba(8, 12, 20, .54));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.debtToggle {
  min-height: 48px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(5, 8, 14, .32);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.debtToggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.debtToggle span {
  display: grid;
  gap: 3px;
}

.debtToggle strong {
  font-size: 13px;
  line-height: 1.15;
  color: rgba(255, 255, 255, .92);
}

.debtToggle small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.debtToolbarActions {
  display: flex;
  justify-content: flex-end;
}

.debtToolbarActions .btn {
  min-height: 48px;
}

.debtSegmented {
  margin-top: 0;
  padding: 4px;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .028);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.debtSegmented .chip {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255, 255, 255, .74);
  background: transparent;
  border-color: transparent;
}

.debtSegmented .chip:hover {
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .92);
}

.debtSegmented .chip.active {
  color: #fff;
  border-color: rgba(254, 78, 14, .28);
  background: linear-gradient(180deg, rgba(254, 78, 14, .22), rgba(254, 78, 14, .12));
  box-shadow: 0 10px 22px rgba(254, 78, 14, .12);
}

.debtResultsMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.debtResultsMeta b {
  color: rgba(255, 255, 255, .94);
}

.debtResultsFlag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 204, 0, .26);
  background: rgba(255, 204, 0, .14);
  color: rgba(255, 255, 255, .86);
}

.debtTableWrap {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(7, 10, 16, .22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 16px 32px rgba(0, 0, 0, .16);
}

.debtDesktopTable {
  overflow: auto;
}

#view-debts #debtTable {
  min-width: 1360px;
}

#view-debts #debtTable th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 16px;
  background: rgba(13, 18, 28, .96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .70);
}

#view-debts #debtTable td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

#view-debts #debtTable tr:hover td {
  background: rgba(255, 255, 255, .035);
}

.debtCustomerCell,
.debtReasonCell,
.debtDueCell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.debtCustomerName,
.debtReasonTitle {
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  line-height: 1.2;
}

.debtCustomerPhone,
.debtReasonHint,
.debtUpdatedHint {
  font-size: 12px;
  color: var(--muted);
}

.debtReasonHint {
  max-width: 340px;
  line-height: 1.45;
}

.debtInlineBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.debtInlineBadges .badge {
  text-transform: none;
}

.debtDueMain {
  font-weight: 900;
  color: rgba(255, 255, 255, .90);
  white-space: nowrap;
}

.debtDueHint {
  font-size: 12px;
  color: var(--muted);
}

.debtMoney {
  font-weight: 980;
  font-size: 14px;
  color: rgba(255, 255, 255, .94);
  white-space: nowrap;
}

.debtMoneyMuted {
  color: rgba(255, 255, 255, .76);
}

.debtRemaining {
  color: rgba(255, 255, 255, .98);
}

.debtRemaining.isOverdue {
  color: #ffd2c2;
}

.debtUpdated {
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
}

.debtRowActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 320px;
}

.debtRowActions .btn {
  white-space: nowrap;
}

.debtStatusStack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.debtEmptyState {
  padding: 18px;
}

.debtEmptyCard {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .16));
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.debtEmptyEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 214, 186, .76);
}

.debtEmptyCard h3 {
  margin: 12px 0 8px;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 990;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .96);
}

.debtEmptyCard p {
  margin: 0 auto;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.debtEmptyActions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.debtCards {
  display: none;
  padding: 14px;
  gap: 12px;
}

.debtCard {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.debtCardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.debtCardIdentity {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.debtCardName {
  font-size: 15px;
  font-weight: 980;
  color: rgba(255, 255, 255, .95);
}

.debtCardPhone,
.debtCardHint,
.debtCardUpdated {
  font-size: 12.5px;
  color: var(--muted);
}

.debtCardReason {
  font-size: 14px;
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  line-height: 1.35;
}

.debtCardDue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.debtCardMoneyGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.debtCardMoneyItem {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.debtCardMoneyItem span {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.debtCardMoneyItem b {
  font-size: 13px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.debtCardMoneyItem b.isOverdue {
  color: #ffd2c2;
}

.debtCardActions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.debtCardActions::-webkit-scrollbar {
  display: none;
}

.debtCardActions .btn {
  white-space: nowrap;
}

html[data-theme="light"] #view-debts .debtKpiCard,
html[data-theme="light"] #view-debts .debtToolbarPanel,
html[data-theme="light"] #view-debts .debtTableWrap,
html[data-theme="light"] #view-debts .debtCard,
html[data-theme="light"] #view-debts .debtEmptyCard {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
}

html[data-theme="light"] #view-debts .debtHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-debts .debtHeroPill b,
html[data-theme="light"] #view-debts .debtCustomerName,
html[data-theme="light"] #view-debts .debtReasonTitle,
html[data-theme="light"] #view-debts .debtDueMain,
html[data-theme="light"] #view-debts .debtMoney,
html[data-theme="light"] #view-debts .debtUpdated,
html[data-theme="light"] #view-debts .debtCardName,
html[data-theme="light"] #view-debts .debtCardReason,
html[data-theme="light"] #view-debts .debtCardMoneyItem b,
html[data-theme="light"] #view-debts .debtEmptyCard h3 {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-debts .debtHeroPillMuted,
html[data-theme="light"] #view-debts .debtHeroSearch label,
html[data-theme="light"] #view-debts .debtKpiLabel,
html[data-theme="light"] #view-debts .debtKpiHint,
html[data-theme="light"] #view-debts .debtResultsMeta,
html[data-theme="light"] #view-debts .debtCustomerPhone,
html[data-theme="light"] #view-debts .debtReasonHint,
html[data-theme="light"] #view-debts .debtUpdatedHint,
html[data-theme="light"] #view-debts .debtDueHint,
html[data-theme="light"] #view-debts .debtCardPhone,
html[data-theme="light"] #view-debts .debtCardHint,
html[data-theme="light"] #view-debts .debtCardUpdated,
html[data-theme="light"] #view-debts .debtCardMoneyItem span,
html[data-theme="light"] #view-debts .debtEmptyCard p {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] #view-debts .debtCardMoneyItem,
html[data-theme="light"] #view-debts .debtToggle {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .96);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-debts .debtToolbarSearchField .search,
html[data-theme="light"] #view-debts .debtToolbarSortField select,
html[data-theme="light"] #view-debts .debtHeroSearch .search {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(11, 18, 32, .10);
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-debts .debtSegmented {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .90);
}

html[data-theme="light"] #view-debts .debtSegmented .chip {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] #view-debts .debtSegmented .chip.active {
  color: rgba(11, 18, 32, .92);
  border-color: rgba(254, 78, 14, .18);
  background: rgba(254, 78, 14, .14);
  box-shadow: none;
}

html[data-theme="light"] #view-debts .debtResultsFlag {
  color: rgba(11, 18, 32, .86);
}

html[data-theme="light"] #view-debts #debtTable th {
  background: rgba(245, 247, 251, .98);
  color: rgba(11, 18, 32, .68);
}

html[data-theme="light"] #view-debts #debtTable td {
  border-bottom: 1px solid rgba(11, 18, 32, .08);
}

html[data-theme="light"] #view-debts #debtTable tr:hover td {
  background: rgba(11, 18, 32, .03);
}

@media (max-width: 980px) {
  #view-debts .debtHero {
    gap: 14px;
  }

  #view-debts .debtHero .headRight {
    width: 100%;
    max-width: none;
  }

  .debtHeroSearch {
    width: 100%;
  }

  .debtHeroSearch .search {
    min-width: 0;
  }

  .debtOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debtToolbarGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debtToolbarActions {
    justify-content: flex-start;
  }

  .debtSegmented {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .debtSegmented::-webkit-scrollbar {
    display: none;
  }

  .debtDesktopTable {
    display: none;
  }

  .debtCards {
    display: grid;
  }
}

@media (max-width: 760px) {
  #view-debts .debtHero {
    padding: 16px;
  }

  .debtToolbarPanel {
    padding: 14px;
  }

  .debtToolbarGrid {
    grid-template-columns: 1fr;
  }

  .debtToolbarActions {
    width: 100%;
  }

  .debtToolbarActions .btn {
    width: 100%;
  }

  .debtHeroMeta {
    align-items: flex-start;
  }

  .debtCardMoneyGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #view-newCustomer .customerEntryHead {
    padding: 14px 16px;
  }

  .customerEntryHeroMeta {
    gap: 6px;
  }

  .customerEntryContextTop,
  .customerDuplicateTop,
  .customerFormActionBar {
    flex-direction: column;
    align-items: flex-start;
  }

  .customerEntryContextGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customerFormActionButtons {
    width: 100%;
    display: grid;
  }

  .customerFormActionButtons .btn {
    width: 100%;
  }

  #view-newPayment .paymentEntryHead {
    padding: 14px 16px;
  }

  #view-newPayment .paymentEntryHeroMeta {
    gap: 6px;
  }

  .paymentContextGrid,
  .paymentLinkGrid,
  .paymentSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paymentSummaryItemPrimary {
    grid-column: 1 / -1;
  }

  .paymentFormActionBar {
    flex-direction: column;
    align-items: stretch;
  }

  .paymentFormActionButtons {
    width: 100%;
  }

  .paymentFormActionButtons .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 520px) {
  .productConfigSummaryGrid {
    grid-template-columns: 1fr;
  }

  .productBundleRow {
    flex-direction: column;
    align-items: stretch;
  }

  .productBundleQty {
    width: 100%;
  }

  .productEntryActionButtons {
    display: grid;
  }

  .productEntryActionButtons .btn {
    width: 100%;
  }

  .customerEntryContextGrid,
  .customerDuplicateActions {
    grid-template-columns: 1fr;
  }

  .customerDuplicateActions {
    display: grid;
    width: 100%;
  }

  .customerDuplicateActions .btn {
    width: 100%;
  }

  .paymentContextGrid,
  .paymentLinkGrid,
  .paymentSummaryGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .debtEmptyCard {
    padding: 22px 16px;
  }
}

@media (max-width: 980px) {
  #view-stock .stockHero {
    gap: 14px;
  }

  #view-stock .stockHero .headRight {
    width: 100%;
    max-width: none;
  }

  .stockHeroSearch {
    width: 100%;
  }

  .stockHeroSearch .search {
    min-width: 0;
  }

  .stockOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stockToolbarGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stockToolbarActions {
    justify-content: flex-start;
  }

  .stockSegmented {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .stockSegmented::-webkit-scrollbar {
    display: none;
  }

  .stockDesktopTable {
    display: none;
  }

  .stockCards {
    display: grid;
  }

  .productModeGuide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #view-stock .stockHero {
    padding: 16px;
  }

  .stockToolbarPanel {
    padding: 14px;
  }

  .stockToolbarGrid {
    grid-template-columns: 1fr;
  }

  .stockToolbarActions {
    width: 100%;
  }

  .stockToolbarActions .btn {
    width: 100%;
  }

  .stockHeroMeta {
    align-items: flex-start;
  }

  .productHeroHead {
    padding: 16px;
    border-radius: 18px;
  }

  .productHeroHead::before {
    left: 16px;
    top: 14px;
    width: 74px;
  }

  .productHeroIntro {
    min-width: 0;
    width: 100%;
    padding-top: 16px;
  }

  .productHeroIntro h1 {
    font-size: 26px;
  }

  .productModeGuide,
  .productLayout {
    grid-template-columns: 1fr;
  }

  .newProductHead {
    padding: 14px 16px;
  }

  .productEntryHeroMeta {
    gap: 6px;
  }

  .productConfigSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .productConfigSummaryItemPrimary {
    grid-column: 1 / -1;
  }

  .productEntryActionBar {
    flex-direction: column;
    align-items: stretch;
  }

  .productEntryActionButtons {
    width: 100%;
  }

  .productEntryActionButtons .btn {
    flex: 1 1 0;
  }

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

  #view-newDebt .debtEntryHead {
    padding: 14px 16px;
  }

  #view-newDebt .debtEntryHeroMeta {
    gap: 7px;
  }

  .debtContextTop,
  .debtSummaryTop,
  .debtFormActionBar {
    flex-direction: column;
    align-items: flex-start;
  }

  .debtContextGrid,
  .debtSummaryGrid {
    grid-template-columns: 1fr;
  }

  .debtFormActionButtons {
    display: grid;
    width: 100%;
  }

  .debtFormActionButtons .btn {
    width: 100%;
  }

  .productToggleHead {
    flex-direction: column;
  }

  .productToggleSwitch {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .stockEmptyCard {
    padding: 22px 16px;
  }
}

.actionMenuWrap {
  position: relative;
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 16px;
  z-index: 50;
}

.menu.hidden {
  display: none;
}

.menuItem {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}

.menuItem+.menuItem {
  margin-top: 6px;
}

.menuItem:hover {
  border-color: rgba(231, 213, 183, .20);
  background: rgba(255, 255, 255, .05);
}

.search {
  width: 360px;
  max-width: 72vw;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  outline: none;
}

.search:focus {
  border-color: rgba(254, 78, 14, .55);
  box-shadow: 0 0 0 4px rgba(254, 78, 14, .12)
}

.chips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px
}

.chip {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .16);
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  font-size: 12px;
}

.chip.active {
  color: var(--text);
  border-color: rgba(254, 78, 14, .45);
  background: rgba(254, 78, 14, .14);
}

.sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, .10);
  margin: 0 4px
}

.tableWrap {
  margin-top: 12px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .04)
}

.panel {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  border-radius: 14px;
  padding: 12px
}

.panel h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .92)
}

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

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, .04)
}

.list li:first-child {
  border-top: none
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px
}

/* Inventory table needs a bit more width (extra columns) so product names don't collapse */
#view-products .table {
  min-width: 1040px
}

@media (max-width: 860px) {
  #view-products .table {
    min-width: 980px
  }
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  text-align: left;
  font-size: 13px;
}

.table th {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 900
}

.table tr:hover td {
  background: rgba(255, 255, 255, .03)
}

/* Quick Cash confirm: key/value summary table should NOT force wide layouts */
#dlgQuickCash .qcWrap {
  overflow: hidden;
  border-color: rgba(255, 255, 255, .06)
}

#dlgQuickCash .qcTable {
  min-width: 0;
  table-layout: fixed
}

#dlgQuickCash .qcTable td {
  padding: 9px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

#dlgQuickCash .qcTable tr:last-child td {
  border-bottom: none
}

#dlgQuickCash .qcTable td.k {
  width: 140px;
  color: var(--muted);
  font-weight: 800
}

#dlgQuickCash .qcTable td.v {
  color: rgba(255, 255, 255, .92)
}

#dlgQuickCash .qcTable b {
  color: rgba(255, 255, 255, .98)
}

/* Quick Cash: make the header/title pop with accent color */
#dlgQuickCash .dlgTitle {
  color: var(--accent)
}

#dlgQuickCash .dlgHead {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(254, 78, 14, .22)
}

/* Quick Cash checkbox copy */
#dlgQuickCash .qcCheck {
  align-items: flex-start;
  gap: 12px
}

#dlgQuickCash .qcCheckTitle {
  font-weight: 950;
  line-height: 1.1
}

#dlgQuickCash .qcCheckSub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.25
}

.mono {
  font-family: var(--mono)
}

.right {
  text-align: right
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center
}

.badge {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 10px;
  font-weight: 950;
  padding: 4px 7px;
  border-radius: 999px;
  /* Filled by default (status badges should read instantly) */
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
  letter-spacing: .2px;
  text-transform: uppercase;
}

/* Full-color status badges */
.badge.accent {
  border-color: rgba(254, 78, 14, .95);
  background: rgba(254, 78, 14, .95);
  color: #ffffff
}

.badge.good {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff
}

.badge.warn {
  border-color: rgba(255, 204, 0, .95);
  background: rgba(255, 204, 0, .95);
  color: rgba(0, 0, 0, .88)
}

.badge.danger {
  border-color: rgba(255, 59, 48, .95);
  background: rgba(255, 59, 48, .95);
  color: #ffffff
}

.badge.installment {
  border-color: rgba(10, 132, 255, .95);
  background: rgba(10, 132, 255, .95);
  color: #ffffff
}

.badge.installmentDone {
  border-color: rgba(0, 166, 118, .95);
  background: rgba(0, 166, 118, .95);
  color: #ffffff
}

/* Light theme: keep neutral badges readable (don't override colored badges) */
html[data-theme="light"] .badge:not(.accent):not(.good):not(.warn):not(.danger):not(.installment):not(.installmentDone):not(.subBadge):not(.svcBadge):not(.bundleBadge):not(.reorderBadge):not(.compBadge):not(.warnBadge) {
  border-color: rgba(0, 0, 0, .10);
  background: rgba(0, 0, 0, .06);
  color: rgba(15, 20, 30, .92);
}

/* --- Small badges / pills (polish v72) --- */
.badge.ok {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

.badge.subBadge {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

.badge.svcBadge {
  border-color: rgba(10, 132, 255, .95);
  background: rgba(10, 132, 255, .95);
  color: #ffffff;
}

.badge.bundleBadge {
  border-color: rgba(254, 78, 14, .95);
  background: rgba(254, 78, 14, .95);
  color: #ffffff;
}

.badge.reorderBadge {
  border-color: rgba(255, 59, 48, .95);
  background: rgba(255, 59, 48, .95);
  color: #ffffff;
}


/* Product name cell (Inventory): make names readable on mobile + desktop */
.pCell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px
}

.pName {
  font-weight: 900;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
  /* fallback */
  max-width: min(420px, 52vw);
}

.pTags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

/* Orders table: customer name/phone should stay clean even when names are long */
#view-orders #ordersTable td {
  vertical-align: top
}

#view-orders .custCell {
  min-width: 190px
}

#view-orders .custName {
  display: inline-block;
  max-width: 260px;
  max-width: min(260px, 22vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 950;
  line-height: 1.15;
}

#view-orders .custPhone {
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  max-width: min(260px, 22vw);
}

#view-settings {
  gap: 12px;
}

.settingsHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 12%, rgba(254, 78, 14, .11), transparent 24%),
    radial-gradient(circle at 84% 14%, rgba(77, 124, 254, .10), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.settingsHead::before {
  top: 12px;
  left: 18px;
  width: 62px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

.settingsHead::after {
  width: 120px;
  height: 120px;
  right: -30px;
  bottom: -34px;
  opacity: .58;
}

.settingsHead .productHeroIntro {
  min-width: 0;
  width: 100%;
  padding-top: 10px;
  gap: 5px;
}

.settingsHead .productHeroIntro h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.settingsHead .productHeroIntro .sub {
  max-width: 760px;
  color: rgba(255, 244, 235, .74);
}

.settingsHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.settingsHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.settingsHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 850;
}

.settingsHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.settingsFormShell {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.settingsLayout {
  gap: 14px;
  align-items: start;
}

.settingsSpan2 {
  grid-column: 1 / -1;
}

.settingsAppearancePanel,
.settingsSecurityPanel,
.settingsAdvancedPanel {
  gap: 14px;
}

.settingsPreviewSurface {
  --settings-preview-accent: var(--accent);
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14)),
    radial-gradient(circle at top right, color-mix(in srgb, var(--settings-preview-accent) 18%, transparent), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.settingsPreviewSidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 12, 20, .78);
  min-width: 0;
}

.settingsPreviewSidebarLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .48);
}

.settingsPreviewSidebarLogo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: -.04em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--settings-preview-accent) 82%, white 18%) 0%, var(--settings-preview-accent) 38%, rgba(11, 18, 32, .96) 38%, rgba(10, 15, 27, .96) 100%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

.settingsPreviewSidebarTitle {
  font-size: 15px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settingsPreviewSidebarMeta {
  font-size: 12px;
  color: rgba(255, 255, 255, .62);
}

.settingsPreviewMain {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.settingsPreviewTopbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.settingsPreviewChip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.settingsPreviewChipAccent {
  border-color: color-mix(in srgb, var(--settings-preview-accent) 28%, rgba(255, 255, 255, .08));
  background: color-mix(in srgb, var(--settings-preview-accent) 18%, rgba(255, 255, 255, .02));
  color: rgba(255, 247, 241, .95);
}

.settingsPreviewCard {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
  min-width: 0;
}

.settingsPreviewCardLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.settingsPreviewCardTitle {
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: -.02em;
  color: rgba(255, 255, 255, .95);
}

.settingsPreviewCardMeta {
  color: rgba(255, 255, 255, .66);
  line-height: 1.5;
}

.settingsPreviewActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.settingsPreviewActions .btn {
  pointer-events: none;
}

.settingsPreviewSurface[data-preview-theme="light"] {
  border-color: rgba(17, 24, 39, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(241, 245, 249, .98)),
    radial-gradient(circle at top right, color-mix(in srgb, var(--settings-preview-accent) 14%, transparent), transparent 36%);
}

.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewSidebar {
  border-color: rgba(15, 23, 42, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(241, 245, 249, .98));
}

.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewSidebarLabel,
.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewCardLabel {
  color: rgba(15, 23, 42, .42);
}

.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewSidebarTitle,
.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewCardTitle {
  color: rgba(15, 23, 42, .94);
}

.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewSidebarMeta,
.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewCardMeta {
  color: rgba(15, 23, 42, .62);
}

.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewCard {
  border-color: rgba(15, 23, 42, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(247, 248, 252, .98));
}

.settingsPreviewSurface[data-preview-theme="light"] .settingsPreviewChip {
  border-color: rgba(15, 23, 42, .08);
  background: rgba(15, 23, 42, .04);
  color: rgba(15, 23, 42, .72);
}

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

.settingsUsageBadge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.settingsSecurityOverview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.settingsSecurityCard {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
}

.settingsSecurityCardLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.settingsSecurityCardValue {
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: -.02em;
  color: rgba(255, 255, 255, .95);
}

.settingsSecurityCardMeta {
  color: rgba(255, 255, 255, .66);
  line-height: 1.5;
}

.settingsSecurityPrimary {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
}

.settingsSecurityPrimary .mini {
  margin-top: 8px;
}

.settingsSecurityBlocks {
  display: grid;
  gap: 12px;
}

.settingsSecurityBlock {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .12));
}

.settingsSecurityBlockHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settingsSecurityBlockHead h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
  color: rgba(255, 255, 255, .95);
}

.settingsSecurityBlockHead p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .64);
  line-height: 1.5;
}

.settingsSecurityFlag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(254, 78, 14, .2);
  background: rgba(254, 78, 14, .12);
  color: rgba(255, 239, 231, .94);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.settingsSecurityFlagMuted {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
}

.settingsAdvancedPanel {
  position: relative;
}

.settingsAdvancedBody {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.settingsAdvancedIntro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.settingsAdvancedTag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.settingsAdvancedState {
  font-size: 18px;
  font-weight: 1000;
  color: rgba(255, 255, 255, .95);
}

.settingsAdvancedHint {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .64);
  line-height: 1.55;
}

.settingsUtilityField {
  display: grid;
  gap: 8px;
}

.settingsUtilityGrid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 10px;
}

.settingsUtilityCard {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .12)),
    radial-gradient(circle at right top, rgba(77, 124, 254, .10), transparent 34%);
}

.settingsUtilityHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settingsUtilityTitle {
  font-size: 14px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.settingsUtilityText {
  margin-top: 4px;
  color: rgba(255, 255, 255, .64);
  line-height: 1.45;
}

.settingsUtilityCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .95);
  font-size: 13px;
  font-weight: 950;
}

.settingsUtilityActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.settingsUtilityHint {
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.settingsActionBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14)),
    radial-gradient(circle at right center, rgba(254, 78, 14, .10), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.settingsActionMeta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.settingsActionState {
  font-size: 15px;
  font-weight: 950;
  color: rgba(255, 255, 255, .95);
}

.settingsActionHint {
  color: rgba(255, 255, 255, .66);
  line-height: 1.55;
}

.settingsActionButtons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

html[data-theme="light"] .settingsHead .productHeroIntro .sub {
  color: rgba(44, 51, 66, .72);
}

html[data-theme="light"] .settingsHeroPill,
html[data-theme="light"] .settingsUsageBadge,
html[data-theme="light"] .settingsSecurityCard,
html[data-theme="light"] .settingsSecurityPrimary,
html[data-theme="light"] .settingsSecurityBlock,
html[data-theme="light"] .settingsUtilityCard,
html[data-theme="light"] .settingsAdvancedIntro,
html[data-theme="light"] .settingsActionBar {
  border-color: rgba(17, 24, 39, .08);
}

html[data-theme="light"] .settingsHeroPill,
html[data-theme="light"] .settingsUsageBadge,
html[data-theme="light"] .settingsSecurityCard,
html[data-theme="light"] .settingsSecurityPrimary,
html[data-theme="light"] .settingsSecurityBlock,
html[data-theme="light"] .settingsUtilityCard,
html[data-theme="light"] .settingsAdvancedIntro {
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .98));
}

html[data-theme="light"] .settingsHeroPill,
html[data-theme="light"] .settingsUsageBadge,
html[data-theme="light"] .settingsSecurityCardLabel,
html[data-theme="light"] .settingsSecurityCardMeta,
html[data-theme="light"] .settingsSecurityBlockHead p,
html[data-theme="light"] .settingsUtilityText,
html[data-theme="light"] .settingsUtilityHint,
html[data-theme="light"] .settingsAdvancedHint,
html[data-theme="light"] .settingsActionHint {
  color: rgba(15, 23, 42, .62);
}

html[data-theme="light"] .settingsHeroPill b,
html[data-theme="light"] .settingsSecurityCardValue,
html[data-theme="light"] .settingsSecurityBlockHead h4,
html[data-theme="light"] .settingsUtilityTitle,
html[data-theme="light"] .settingsUtilityCount,
html[data-theme="light"] .settingsAdvancedState,
html[data-theme="light"] .settingsActionState {
  color: rgba(15, 23, 42, .92);
}

html[data-theme="light"] .settingsActionBar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(245, 247, 251, .98)),
    radial-gradient(circle at right center, rgba(254, 78, 14, .10), transparent 34%);
}

@media (max-width: 1100px) {
  .settingsSecurityOverview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settingsPreviewSurface,
  .settingsAdvancedBody {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .settingsHead {
    padding: 14px;
  }

  .settingsHeadActions {
    width: 100%;
    justify-content: flex-start;
  }

  .settingsHeroMeta {
    gap: 8px;
  }

  .settingsSecurityOverview {
    grid-template-columns: 1fr;
  }

  .settingsUtilityActions,
  .settingsSecurityBlockHead,
  .settingsActionBar {
    flex-direction: column;
    align-items: flex-start;
  }

  .settingsActionButtons {
    width: 100%;
    justify-content: flex-start;
  }
}

#view-backupData {
  gap: 12px;
}

.backupDataHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 12%, rgba(254, 78, 14, .11), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(77, 124, 254, .08), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.backupDataHead::before {
  top: 12px;
  left: 18px;
  width: 70px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

.backupDataHead::after {
  width: 120px;
  height: 120px;
  right: -30px;
  bottom: -34px;
  opacity: .6;
}

.backupDataHead .productHeroIntro {
  min-width: 0;
  width: 100%;
  padding-top: 10px;
  gap: 5px;
}

.backupDataHead .productHeroIntro h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.backupDataHead .productHeroIntro .sub {
  max-width: 760px;
  color: rgba(255, 244, 235, .74);
}

.backupDataHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.backupDataHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.backupDataHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 850;
}

.backupDataHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.backupDataLayout {
  gap: 14px;
}

.backupSpan2 {
  grid-column: 1 / -1;
}

.backupSafePanel,
.backupDiagnosticsPanel,
.backupDangerPanel {
  gap: 14px;
}

.backupZoneTag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
}

.backupZoneTagSafe {
  border-color: rgba(52, 199, 89, .18);
  background: rgba(52, 199, 89, .10);
  color: rgba(232, 255, 239, .92);
}

.backupZoneTagDiag {
  border-color: rgba(77, 124, 254, .18);
  background: rgba(77, 124, 254, .10);
  color: rgba(237, 243, 255, .92);
}

.backupZoneTagDanger {
  border-color: rgba(255, 69, 58, .22);
  background: rgba(255, 69, 58, .10);
  color: rgba(255, 238, 237, .94);
}

.backupOverviewGrid,
.backupDiagnosticsMetrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.backupOverviewCard,
.backupDiagCard {
  display: grid;
  gap: 8px;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
  min-width: 0;
}

.backupOverviewLabel,
.backupDiagLabel,
.backupReportLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.backupOverviewValue,
.backupDiagValue {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 1000;
  color: rgba(255, 255, 255, .96);
}

.backupOverviewMeta,
.backupDiagMeta {
  color: rgba(255, 255, 255, .66);
  line-height: 1.5;
}

.backupActionBar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
}

.backupActionButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backupActionMeta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.backupActionState {
  font-size: 14px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.backupActionHint,
.backupTrustText,
.backupDangerText {
  color: rgba(255, 255, 255, .66);
  line-height: 1.55;
}

.backupTrustGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.backupUtilityGrid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

.backupTrustCard {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .10));
}

.backupTrustLabel {
  font-size: 12px;
  font-weight: 950;
  color: rgba(255, 255, 255, .9);
}

.backupShortcutCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .12)),
    radial-gradient(circle at right top, rgba(52, 199, 89, .10), transparent 34%);
}

.backupShortcutHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.backupShortcutTitle {
  font-size: 16px;
  font-weight: 950;
  color: rgba(255, 255, 255, .95);
}

.backupShortcutCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .95);
  font-size: 13px;
  font-weight: 950;
}

.backupShortcutActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.backupShortcutHint {
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.backupDiagnosticsPanel {
  border-color: rgba(77, 124, 254, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    radial-gradient(circle at right top, rgba(77, 124, 254, .10), transparent 30%);
}

.backupDiagnosticsActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backupHealthSummary {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
}

.backupHealthSummaryTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.backupHealthSummaryLead {
  font-size: 14px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.backupHealthSummaryMeta {
  color: rgba(255, 255, 255, .68);
  line-height: 1.5;
}

.backupHealthStatus {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.backupHealthStatus.is-ok {
  border-color: rgba(52, 199, 89, .18);
  background: rgba(52, 199, 89, .10);
  color: rgba(232, 255, 239, .94);
}

.backupHealthStatus.is-warn {
  border-color: rgba(255, 159, 10, .18);
  background: rgba(255, 159, 10, .10);
  color: rgba(255, 245, 222, .94);
}

.backupHealthStatus.is-error {
  border-color: rgba(255, 69, 58, .20);
  background: rgba(255, 69, 58, .10);
  color: rgba(255, 237, 235, .94);
}

.backupReportShell {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .10));
}

.backupReportHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.backupReportTitle {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 980;
  color: rgba(255, 255, 255, .95);
}

.backupReportMeta {
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.healthIssuesWrap {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(6, 10, 18, .22);
  overflow: hidden;
}

.healthIssueRow td {
  vertical-align: top;
}

.healthIssueRow[data-severity="error"] td:first-child {
  border-left: 3px solid rgba(255, 69, 58, .58);
}

.healthIssueRow[data-severity="warn"] td:first-child {
  border-left: 3px solid rgba(255, 159, 10, .58);
}

.healthIssueRow[data-severity="info"] td:first-child {
  border-left: 3px solid rgba(77, 124, 254, .54);
}

.healthIssueRef {
  color: rgba(255, 255, 255, .68);
}

.backupDangerPanel {
  border-color: rgba(255, 69, 58, .18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 69, 58, .06)),
    radial-gradient(circle at right bottom, rgba(255, 69, 58, .10), transparent 36%);
}

.backupDangerBody {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 69, 58, .18);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .14));
}

.backupDangerCopy {
  display: grid;
  gap: 8px;
}

.backupDangerTitle {
  font-size: 19px;
  font-weight: 1000;
  color: rgba(255, 245, 244, .96);
}

.backupDangerActions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.backupDangerHint {
  color: rgba(255, 216, 213, .78);
  font-size: 12px;
  text-align: right;
}

html[data-theme="light"] .backupDataHead .productHeroIntro .sub {
  color: rgba(44, 51, 66, .72);
}

html[data-theme="light"] .backupDataHeroPill,
html[data-theme="light"] .backupOverviewCard,
html[data-theme="light"] .backupDiagCard,
html[data-theme="light"] .backupActionBar,
html[data-theme="light"] .backupTrustCard,
html[data-theme="light"] .backupReportShell,
html[data-theme="light"] .backupDangerBody {
  border-color: rgba(17, 24, 39, .08);
}

html[data-theme="light"] .backupDataHeroPill,
html[data-theme="light"] .backupOverviewCard,
html[data-theme="light"] .backupDiagCard,
html[data-theme="light"] .backupActionBar,
html[data-theme="light"] .backupTrustCard,
html[data-theme="light"] .backupReportShell {
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .98));
}

html[data-theme="light"] .backupDangerPanel {
  border-color: rgba(220, 38, 38, .14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(254, 242, 242, .98)),
    radial-gradient(circle at right bottom, rgba(255, 69, 58, .10), transparent 36%);
}

html[data-theme="light"] .backupDangerBody {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(254, 242, 242, .98));
}

html[data-theme="light"] .backupDataHeroPill,
html[data-theme="light"] .backupOverviewLabel,
html[data-theme="light"] .backupOverviewMeta,
html[data-theme="light"] .backupDiagLabel,
html[data-theme="light"] .backupDiagMeta,
html[data-theme="light"] .backupActionHint,
html[data-theme="light"] .backupTrustText,
html[data-theme="light"] .backupReportMeta,
html[data-theme="light"] .backupHealthSummaryMeta {
  color: rgba(15, 23, 42, .62);
}

html[data-theme="light"] .backupDataHeroPill b,
html[data-theme="light"] .backupOverviewValue,
html[data-theme="light"] .backupDiagValue,
html[data-theme="light"] .backupActionState,
html[data-theme="light"] .backupTrustLabel,
html[data-theme="light"] .backupShortcutTitle,
html[data-theme="light"] .backupShortcutCount,
html[data-theme="light"] .backupReportTitle,
html[data-theme="light"] .backupHealthSummaryLead,
html[data-theme="light"] .backupDangerTitle {
  color: rgba(15, 23, 42, .92);
}

html[data-theme="light"] .backupShortcutCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(245, 247, 251, .98)),
    radial-gradient(circle at right top, rgba(52, 199, 89, .08), transparent 34%);
}

html[data-theme="light"] .backupShortcutHint {
  color: rgba(15, 23, 42, .62);
}

html[data-theme="light"] .backupHealthSummary,
html[data-theme="light"] .healthSummary {
  border-color: rgba(17, 24, 39, .08);
}

@media (max-width: 1100px) {

  .backupOverviewGrid,
  .backupDiagnosticsMetrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backupTrustGrid {
    grid-template-columns: 1fr;
  }

  .backupDangerBody {
    grid-template-columns: 1fr;
  }

  .backupDangerActions {
    justify-items: start;
  }

  .backupDangerHint {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .backupDataHead {
    padding: 14px;
  }

  .backupDataHeadActions {
    width: 100%;
    justify-content: flex-start;
  }

  .backupDataHeroMeta {
    gap: 8px;
  }

  .backupOverviewGrid,
  .backupDiagnosticsMetrics {
    grid-template-columns: 1fr;
  }

  .backupActionBar {
    grid-template-columns: 1fr;
  }

  .backupActionButtons,
  .backupDiagnosticsActions {
    width: 100%;
  }

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

  .backupReportMeta {
    text-align: left;
  }

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

#view-businessProfile {
  gap: 12px;
}

.businessProfileHead {
  padding: 14px 18px;
  min-height: 0;
  height: auto;
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 10% 14%, rgba(254, 78, 14, .10), transparent 24%),
    radial-gradient(circle at 86% 16%, rgba(255, 255, 255, .06), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.businessProfileHead::before {
  top: 12px;
  left: 18px;
  width: 70px;
  height: 5px;
  box-shadow: none;
  opacity: .9;
}

.businessProfileHead::after {
  width: 120px;
  height: 120px;
  right: -30px;
  bottom: -34px;
  opacity: .62;
}

.businessProfileHead .productHeroIntro {
  min-width: 0;
  width: 100%;
  padding-top: 10px;
  gap: 5px;
}

.businessProfileHead .productHeroIntro h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.businessProfileHead .productHeroIntro .sub {
  max-width: 720px;
  color: rgba(255, 244, 235, .74);
}

.businessProfileHeadActions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.businessProfileHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.businessProfileHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 850;
}

.businessProfileHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.businessProfileLayout {
  gap: 14px;
}

.businessProfileSpan2 {
  grid-column: 1 / -1;
}

.businessLogoUploadPanel {
  gap: 14px;
}

.businessLogoPreviewWrap {
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

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

.businessLogoSpecs span,
.businessUseBadge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.businessLogoControlGrid {
  display: grid;
  gap: 12px;
}

.businessLogoZoomField {
  display: grid;
  gap: 8px;
}

.businessLogoZoomField label {
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
}

.businessLogoZoomRow {
  grid-template-columns: 76px minmax(0, 1fr) 58px;
  margin-top: 0;
}

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

.businessPreviewGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.businessPreviewCard {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
  min-width: 0;
}

.businessPreviewLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .52);
}

.businessPreviewSidebar,
.businessPreviewDocHead,
.businessPreviewPrintBar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.businessPreviewSidebar {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(8, 12, 20, .62);
}

.businessPreviewLogo {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(145deg, rgba(255, 160, 110, .96) 0%, rgba(254, 78, 14, .94) 26%, rgba(18, 24, 38, .98) 26%, rgba(11, 18, 32, .96) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

.businessPreviewLogo.is-doc {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 14px;
}

.businessPreviewLogo.is-print {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 13px;
}

.businessPreviewLogo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--businessPreviewLogoZoom, 1.15));
  transform-origin: center;
  background: rgba(8, 12, 20, .92);
}

.businessPreviewLogo span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .95);
}

.businessPreviewContent,
.businessPreviewDocTitleGroup,
.businessPreviewPrintText {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.businessPreviewTitle {
  font-size: 14px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.businessPreviewSub {
  font-size: 12px;
  color: rgba(255, 255, 255, .64);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.businessPreviewMini {
  font-size: 11px;
  color: rgba(255, 255, 255, .46);
}

.businessPreviewDocHead {
  align-items: flex-start;
}

.businessPreviewDocTag {
  margin-left: auto;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(254, 78, 14, .22);
  background: rgba(254, 78, 14, .12);
  color: rgba(255, 222, 205, .96);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
}

.businessPreviewDocMeta {
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, .10);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .62);
}

.businessProfileActionBar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.businessProfileActionMeta {
  display: grid;
  gap: 4px;
}

.businessProfileActionState {
  font-size: 13px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.businessProfileActionState.is-dirty {
  color: rgba(255, 214, 186, .98);
}

.businessProfileActionState.is-clean {
  color: rgba(214, 255, 235, .92);
}

.businessProfileActionHint {
  font-size: 12px;
  color: rgba(255, 255, 255, .56);
}

.businessProfileActionButtons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


.logoPreviewWrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .02);
}

.logoPreviewStage {
  position: relative;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    linear-gradient(145deg, rgba(255, 160, 110, .96) 0%, rgba(254, 78, 14, .94) 26%, rgba(18, 24, 38, .98) 26%, rgba(11, 18, 32, .96) 100%);
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.logoPreviewStage::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: radial-gradient(circle at 24% 22%, rgba(255, 255, 255, .18), transparent 34%);
}

.logoPreviewWrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--previewLogoZoom, 1.15));
  transform-origin: center;
  background: rgba(8, 12, 20, .92);
  padding: 0;
  border: none;
  border-radius: 0;
}

.logoPreviewContent {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.logoPreviewTitle {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}

.logoPreviewMeta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.logoPreviewActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.logoZoomRow {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.logoZoomRow label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.logoZoomRow input[type="range"] {
  width: 100%;
}

.logoZoomRow span {
  min-width: 44px;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}

.logoUploadPanel {
  display: grid;
  gap: 12px;
}

.logoUploadControls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.logoPreviewFallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 1000;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .94);
}

.logoPreviewWrap.hasLogo .logoPreviewFallback {
  opacity: 0;
}

html[data-theme="light"] .businessProfileHead {
  border-color: rgba(15, 20, 30, .08);
  background:
    radial-gradient(circle at 10% 14%, rgba(254, 78, 14, .08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(248, 250, 252, .95));
}

html[data-theme="light"] .businessProfileHeroPill,
html[data-theme="light"] .businessLogoSpecs span,
html[data-theme="light"] .businessUseBadge,
html[data-theme="light"] .businessPreviewCard {
  border-color: rgba(15, 20, 30, .08);
}

html[data-theme="light"] .businessProfileHeroPill,
html[data-theme="light"] .businessLogoSpecs span,
html[data-theme="light"] .businessUseBadge {
  background: rgba(15, 20, 30, .03);
  color: rgba(15, 20, 30, .68);
}

html[data-theme="light"] .businessProfileHeroPill b,
html[data-theme="light"] .businessPreviewTitle,
html[data-theme="light"] .businessProfileActionState {
  color: rgba(15, 20, 30, .92);
}

html[data-theme="light"] .businessPreviewSub,
html[data-theme="light"] .businessPreviewDocMeta,
html[data-theme="light"] .businessProfileActionHint,
html[data-theme="light"] .businessPreviewMini,
html[data-theme="light"] .businessPreviewLabel {
  color: rgba(15, 20, 30, .56);
}

@media (max-width: 1180px) {
  .businessPreviewGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .businessProfileHead {
    padding: 12px 14px;
  }

  .businessProfileHead .productHeroIntro {
    padding-top: 8px;
  }

  .businessLogoPreviewWrap {
    flex-direction: column;
  }

  .businessLogoZoomRow {
    grid-template-columns: 64px minmax(0, 1fr) 50px;
  }

  .businessProfileActionBar,
  .businessProfileActionButtons {
    flex-direction: column;
    align-items: stretch;
  }

  .businessProfileActionButtons .btn {
    width: 100%;
  }
}

.expenseHeroHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: end;
  gap: 18px;
  margin-bottom: 10px;
  padding: 16px 18px;
}

.expenseHeroRight {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 12px;
}

#view-expenses #btnGoNewExpense {
  order: -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 184px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.01em;
  border-color: rgba(254, 78, 14, .62);
  background:
    linear-gradient(180deg, rgba(254, 78, 14, .24), rgba(254, 78, 14, .18)),
    rgba(255, 255, 255, .02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 14px 28px rgba(254, 78, 14, .16);
}

#view-expenses #btnGoNewExpense:hover {
  border-color: rgba(254, 78, 14, .78);
  background:
    linear-gradient(180deg, rgba(254, 78, 14, .30), rgba(254, 78, 14, .22)),
    rgba(255, 255, 255, .03);
  transform: translateY(-1px);
}

#view-expenses #expensesSearch {
  order: 1;
  width: 100%;
}

.expenseHeroMeta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expenseHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
}

.expenseHeroPill b {
  color: rgba(255, 255, 255, .96);
  font-weight: 950;
}

.expenseHeroPillMuted {
  color: rgba(255, 255, 255, .62);
}

.expenseStatsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.expenseStatCard {
  display: grid;
  gap: 7px;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 16% 16%, rgba(254, 78, 14, .10), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.expenseStatLabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 950;
  color: rgba(255, 235, 224, .66);
}

.expenseStatCard strong {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 1000;
  color: rgba(255, 255, 255, .97);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.expenseStatCard small {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.expenseControlsPanel {
  margin-top: 0;
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.expenseControlHead {
  display: grid;
  gap: 12px;
}

.expenseSegmented {
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.expenseSegmented::-webkit-scrollbar {
  display: none;
}

.expenseSegmented .chip {
  padding: 9px 13px;
  white-space: nowrap;
}

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

.expenseControlField {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.expenseControlField label {
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
}

.expenseControlField input,
.expenseControlField select {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  outline: none;
  min-height: 40px;
}

.expenseControlField input:focus,
.expenseControlField select:focus {
  border-color: rgba(254, 78, 14, .55);
  box-shadow: 0 0 0 4px rgba(254, 78, 14, .12);
}

.expenseControlField select option {
  background: var(--bg);
  color: var(--text);
}

.expenseToggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .82);
  font-size: 12.5px;
  font-weight: 850;
}

.expenseToggle input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.expenseResultsMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.expenseResultsMeta b {
  color: rgba(255, 255, 255, .94);
}

.expenseResultsFlag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(254, 78, 14, .18);
  background: rgba(254, 78, 14, .10);
  color: rgba(255, 244, 232, .90);
  font-weight: 900;
}

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

.expenseCategoryChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.expenseCategoryChip b {
  color: rgba(255, 255, 255, .95);
  font-family: var(--mono);
}

.expenseCategoryChip.active {
  border-color: rgba(254, 78, 14, .22);
  background: rgba(254, 78, 14, .10);
  color: #ffe8d8;
}

.expenseCategoryChip[data-tone="loan"] {
  border-color: rgba(77, 124, 254, .16);
  background: rgba(77, 124, 254, .08);
}

.expenseCategoryChip[data-tone="rent"] {
  border-color: rgba(254, 78, 14, .16);
  background: rgba(254, 78, 14, .08);
}

.expenseTablePanel {
  margin-top: 0;
  padding: 16px;
}

.expenseBoardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.expenseBoardMonth {
  flex: 0 0 auto;
}

.expenseBoardMonthCard {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
}

.expenseBoardMonthCard span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .56);
  font-weight: 900;
}

.expenseBoardMonthCard b {
  color: rgba(255, 255, 255, .95);
  font-size: 14px;
  font-weight: 950;
}

.expenseCardGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.expenseCardGrid>.expenseItem:only-child,
.expenseCardGrid>.expenseEmpty:only-child,
.expenseCardGrid>.expenseItem:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.expenseItem {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 10% 10%, rgba(254, 78, 14, .10), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 34px rgba(0, 0, 0, .18);
  overflow: hidden;
}

.expenseItem::after {
  content: "";
  position: absolute;
  inset: auto -28px -42px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(254, 78, 14, .09), rgba(254, 78, 14, 0) 72%);
  pointer-events: none;
}

.expenseItemTop {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.expenseItemMain {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.expenseItemBadges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.expenseCategoryPill,
.expenseMiniPill,
.expenseStatusPill,
.expenseAlertPill,
.expenseReminderPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-weight: 900;
}

.expenseCategoryPill[data-tone="rent"] {
  border-color: rgba(254, 78, 14, .20);
  background: rgba(254, 78, 14, .10);
  color: #ffe6d5;
}

.expenseCategoryPill[data-tone="loan"] {
  border-color: rgba(77, 124, 254, .20);
  background: rgba(77, 124, 254, .10);
  color: #e6edff;
}

.expenseCategoryPill[data-tone="power"] {
  border-color: rgba(255, 194, 49, .22);
  background: rgba(255, 194, 49, .10);
  color: #fff0c6;
}

.expenseCategoryPill[data-tone="internet"] {
  border-color: rgba(145, 220, 255, .18);
  background: rgba(145, 220, 255, .08);
  color: #e7f7ff;
}

.expenseCategoryPill[data-tone="salary"] {
  border-color: rgba(67, 210, 123, .18);
  background: rgba(67, 210, 123, .08);
  color: #dcffe7;
}

.expenseMiniPill {
  color: rgba(255, 255, 255, .72);
}

.expenseStateRow {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expenseStatusPill[data-tone="good"],
.expenseAlertPill[data-tone="good"] {
  border-color: rgba(67, 210, 123, .24);
  background: rgba(67, 210, 123, .12);
  color: #dcffe7;
}

.expenseStatusPill[data-tone="accent"] {
  border-color: rgba(254, 78, 14, .24);
  background: rgba(254, 78, 14, .12);
  color: #ffe6d5;
}

.expenseStatusPill[data-tone="warn"],
.expenseAlertPill[data-tone="warn"] {
  border-color: rgba(255, 194, 49, .24);
  background: rgba(255, 194, 49, .12);
  color: #fff0c6;
}

.expenseStatusPill[data-tone="danger"],
.expenseAlertPill[data-tone="danger"] {
  border-color: rgba(255, 99, 99, .24);
  background: rgba(255, 99, 99, .12);
  color: #ffd9d9;
}

.expenseItemTitle {
  margin: 0;
  font-size: 19px;
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 980;
  color: rgba(255, 255, 255, .97);
}

.expenseItemMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.expenseItemDot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
}

.expenseItemTotal {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  min-width: 112px;
  text-align: right;
}

.expenseItemTotal span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 235, 224, .62);
  font-weight: 950;
}

.expenseItemTotal strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 1000;
  color: rgba(255, 255, 255, .97);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.expenseMetricGrid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.expenseMetric {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .03);
}

.expenseMetricLabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .56);
  font-weight: 900;
}

.expenseMetricValue {
  font-size: 16px;
  line-height: 1;
  font-weight: 950;
  color: rgba(255, 255, 255, .95);
  font-variant-numeric: tabular-nums;
}

.expenseMetricValue.isDanger {
  color: #ffd9d9;
}

.expenseMetric small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.expenseProgress {
  position: relative;
  z-index: 1;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .07);
}

.expenseProgress span {
  display: block;
  height: 100%;
  width: var(--expense-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(254, 78, 14, .98), rgba(255, 214, 186, .92));
  box-shadow: none;
}

.expenseFoot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.expenseFootNote {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.expenseFootNote strong {
  color: rgba(255, 255, 255, .88);
}

.expenseActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.expenseActionMenu {
  position: relative;
}

.expenseActionMenu[open] {
  z-index: 8;
}

.expenseActionMenu summary {
  list-style: none;
}

.expenseActionMenu summary::-webkit-details-marker {
  display: none;
}

.expenseMenuTrigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.expenseMenuTrigger:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.expenseMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(190px, 82vw);
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(16, 22, 34, .96);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .30);
}

.expenseMenuItem {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}

.expenseMenuItem:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.expenseMenuItem.danger {
  border-color: rgba(255, 99, 99, .26);
  background: rgba(255, 99, 99, .10);
  color: #ffd7d7;
}

.expenseEmpty {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: start;
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, .12);
  background:
    radial-gradient(circle at 12% 16%, rgba(254, 78, 14, .10), transparent 28%),
    rgba(255, 255, 255, .02);
}

.expenseEmptyIcon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  display: grid;
  place-items: center;
}

.expenseEmptyIcon span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(254, 78, 14, .78);
  border-top-color: rgba(255, 255, 255, .24);
}

.expenseEmpty strong {
  font-size: 16px;
  color: rgba(255, 255, 255, .94);
}

.expenseEmpty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.expenseEmptyActions,
.expenseQuickAdd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expenseQuickAddBtn {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .84);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.expenseQuickAddBtn:hover {
  border-color: rgba(254, 78, 14, .22);
  background: rgba(254, 78, 14, .08);
}

html[data-theme="light"] #view-expenses .expenseHeroPill,
html[data-theme="light"] #view-expenses .expenseStatCard,
html[data-theme="light"] #view-expenses .expenseControlsPanel,
html[data-theme="light"] #view-expenses .expenseTablePanel,
html[data-theme="light"] #view-expenses .expenseItem,
html[data-theme="light"] #view-expenses .expenseMetric,
html[data-theme="light"] #view-expenses .expenseBoardMonthCard,
html[data-theme="light"] #view-expenses .expenseEmpty,
html[data-theme="light"] #view-expenses .expenseToggle {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
}

html[data-theme="light"] #view-expenses .expenseHeroPill b,
html[data-theme="light"] #view-expenses .expenseStatCard strong,
html[data-theme="light"] #view-expenses .expenseBoardMonthCard b,
html[data-theme="light"] #view-expenses .expenseItemTitle,
html[data-theme="light"] #view-expenses .expenseItemTotal strong,
html[data-theme="light"] #view-expenses .expenseMetricValue,
html[data-theme="light"] #view-expenses .expenseEmpty strong {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-expenses .expenseHeroPill,
html[data-theme="light"] #view-expenses .expenseHeroPillMuted,
html[data-theme="light"] #view-expenses .expenseStatCard small,
html[data-theme="light"] #view-expenses .expenseResultsMeta,
html[data-theme="light"] #view-expenses .expenseControlField label,
html[data-theme="light"] #view-expenses .expenseBoardMonthCard span,
html[data-theme="light"] #view-expenses .expenseItemMeta,
html[data-theme="light"] #view-expenses .expenseMetric small,
html[data-theme="light"] #view-expenses .expenseFootNote,
html[data-theme="light"] #view-expenses .expenseEmpty p {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] #view-expenses .expenseMenuTrigger,
html[data-theme="light"] #view-expenses .expenseMenuPanel,
html[data-theme="light"] #view-expenses .expenseMenuItem,
html[data-theme="light"] #view-expenses .expenseQuickAddBtn,
html[data-theme="light"] #view-expenses .expenseCategoryChip {
  border-color: rgba(11, 18, 32, .10);
}

html[data-theme="light"] #view-expenses .expenseControlField input,
html[data-theme="light"] #view-expenses .expenseControlField select {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .95);
  color: rgba(11, 18, 32, .90);
  box-shadow: none;
}

html[data-theme="light"] #view-expenses .expenseControlField select option {
  background: rgba(255, 255, 255, 1);
  color: rgba(11, 18, 32, .90);
}

html[data-theme="light"] #view-expenses .expenseMenuTrigger,
html[data-theme="light"] #view-expenses .expenseMenuItem,
html[data-theme="light"] #view-expenses .expenseQuickAddBtn,
html[data-theme="light"] #view-expenses .expenseCategoryChip {
  background: rgba(255, 255, 255, .95);
  color: rgba(11, 18, 32, .88);
}

html[data-theme="light"] #view-expenses .expenseMenuPanel {
  background: rgba(255, 255, 255, .98);
}

@media (max-width: 1100px) {
  .expenseHeroHead {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .expenseStatsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expenseCardGrid {
    grid-template-columns: 1fr;
  }

  .expenseHeroRight {
    width: 100%;
    gap: 10px;
  }

  #view-expenses #btnGoNewExpense {
    justify-self: start;
    min-width: 0;
  }

  .expenseControlRow {
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .expenseStatsGrid {
    grid-template-columns: 1fr;
  }

  .expenseControlField {
    min-width: 0;
    width: 100%;
  }

  .expenseToggle {
    width: 100%;
    justify-content: flex-start;
  }

  .expenseMetricGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expenseItemTop,
  .expenseFoot {
    flex-direction: column;
    align-items: flex-start;
  }

  .expenseItemTotal,
  .expenseActions {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }

  .expenseBoardMonth {
    width: 100%;
  }

  .expenseBoardMonthCard {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .expenseMetricGrid {
    grid-template-columns: 1fr;
  }

  .expenseEmptyActions,
  .expenseQuickAdd {
    width: 100%;
  }
}

.form {
  margin-top: 14px
}

.grid2 {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr
}

@media (max-width: 860px) {
  .grid2 {
    grid-template-columns: 1fr
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.field label {
  font-size: 12px;
  color: var(--muted)
}

.req {
  color: var(--accent)
}

.field input,
.field select,
.field textarea {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  outline: none;
}

/* Ensure dropdown option text is readable (Windows/Chrome can render white-on-white). */
.field select option {
  background: var(--bg);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(254, 78, 14, .55);
  box-shadow: 0 0 0 4px rgba(254, 78, 14, .12);
}

.field textarea {
  min-height: 92px;
  resize: vertical
}

.lookupField {
  position: relative;
  z-index: 1
}

.lookupField.lookupOpen {
  z-index: 45
}

.lookupBox {
  position: relative
}

.lookupPanel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(12, 16, 26, .96);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .42);
  -webkit-backdrop-filter: blur(var(--glassBlur));
  backdrop-filter: blur(var(--glassBlur));
  overflow: hidden;
  z-index: 60;
}

.lookupPanelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

.lookupPanelTitle {
  font-size: 13px;
  font-weight: 950;
  color: rgba(255, 255, 255, .96);
}

.lookupPanelMeta {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.lookupResults {
  display: grid;
  gap: 6px;
  padding: 8px;
  max-height: 320px;
  overflow: auto;
}

.lookupItem {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.lookupItem:hover,
.lookupItem.active {
  border-color: rgba(254, 78, 14, .28);
  background: rgba(254, 78, 14, .10);
  transform: translateY(-1px);
}

.lookupItemTitle {
  font-weight: 950;
  color: rgba(255, 255, 255, .95);
  line-height: 1.15;
}

.lookupItemMeta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.lookupTags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.lookupTag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .85);
  letter-spacing: .03em;
}

.lookupTag.accent {
  border-color: rgba(254, 78, 14, .95);
  background: rgba(254, 78, 14, .95);
  color: #fff;
}

.lookupTag.good {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

.lookupTag.warn {
  border-color: rgba(255, 204, 0, .95);
  background: rgba(255, 204, 0, .95);
  color: rgba(0, 0, 0, .88);
}

.lookupEmpty {
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .10);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  background: rgba(255, 255, 255, .02);
}

@media (max-width: 760px) {
  .lookupPanel {
    left: -4px;
    right: -4px;
  }

  .lookupResults {
    max-height: 260px;
  }
}

.span2 {
  grid-column: 1 / -1
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap
}

.cityPick {
  display: flex;
  gap: 10px
}

.cityPick input {
  flex: 1
}

.mini {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.3
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  font-size: 13px
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent)
}

.taskMeta {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px
}

.taskMeta .strong {
  color: rgba(255, 255, 255, .85);
  font-weight: 900
}


.iconbtn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .20);
  color: var(--text);
  cursor: pointer;
}

/* Fullscreen buttons (v103) */
.fsNavBtn {
  margin-left: auto;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  align-self: flex-start;
  background: rgba(10, 12, 18, .28);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.fsNavBtn svg {
  width: 18px;
  height: 18px;
}

.fsNavBtn:hover {
  border-color: rgba(254, 78, 14, .42);
  background: rgba(254, 78, 14, .12);
}

.fsFab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(231, 213, 183, .28);
  background: linear-gradient(135deg, rgba(254, 78, 14, .20), rgba(231, 213, 183, .10));
  box-shadow: 0 22px 48px rgba(0, 0, 0, .45), 0 18px 40px rgba(254, 78, 14, .10);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  -webkit-tap-highlight-color: transparent;
}

.fsFab svg {
  width: 22px;
  height: 22px;
}

.fsFab:active {
  transform: translateY(1px);
}

.dlg::backdrop {
  background: rgba(0, 0, 0, .55)
}

.dlg {
  border: none;
  background: transparent
}

/* Dialog fallback (older iOS Safari): emulate showModal/close with [open] + backdrop on the element. */
html.noDialog .dlg[open] {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  background: rgba(0, 0, 0, .55);
  z-index: 9999;
}

html.noDialog .dlg[open] .dlgCard {
  max-height: calc((var(--vvh, 1vh) * 100) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px);
  overflow: auto;
}

.dlgCard {
  width: min(860px, 94vw);
  max-height: calc((var(--vvh, 1vh) * 100) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px);
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(12, 16, 26, .94);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(var(--glassBlur));
  backdrop-filter: blur(var(--glassBlur));
  padding: 14px;
  color: var(--text);
  overflow: auto;
}

.dlgHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px
}

.dlgTitle {
  font-weight: 950;
  font-size: 16px;
  color: var(--text)
}

.dlgSub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px
}

.dlgActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px
}

.dlgBody {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr
}

@media (max-width: 860px) {
  .dlgBody {
    grid-template-columns: 1fr
  }
}

#dlgPorosi .dlgCard {
  width: min(980px, 96vw);
}

.orderEditShell {
  display: grid;
  gap: 14px;
}

.orderEditSection {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .018));
}

.orderEditHero {
  border-color: rgba(254, 78, 14, .18);
  background:
    radial-gradient(circle at top right, rgba(254, 78, 14, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

.orderEditSectionHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.orderEditSectionTitle {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .94);
}

.orderEditSectionSub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.orderEditStats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.orderStat,
.orderLedgerStat {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  min-width: 0;
}

.orderStat span,
.orderLedgerStat span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.orderStat strong,
.orderLedgerStat strong {
  font-size: 18px;
  font-weight: 950;
  color: rgba(255, 255, 255, .96);
  line-height: 1.15;
  word-break: break-word;
}

.orderEditGrid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.orderLedgerSummary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.orderLedgerActions {
  margin-top: 0;
}

.orderLedgerTable {
  margin-top: 0;
}

.orderTimeline {
  display: grid;
  gap: 10px;
}

.orderTimelineItem {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
}

.orderTimelineDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
}

.orderTimelineDot.k-create {
  background: #5ac8fa;
  box-shadow: 0 0 0 3px rgba(90, 200, 250, .2);
}

.orderTimelineDot.k-payment {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .2);
}

.orderTimelineDot.k-installment {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .2);
}

.orderTimelineDot.k-audit {
  background: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, .2);
}

.orderTimelineTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.orderTimelineTop strong {
  font-size: 13px;
  font-weight: 900;
  color: rgba(255, 255, 255, .96);
}

.orderTimelineValue {
  font-size: 12px;
  font-weight: 850;
  color: var(--pri);
  white-space: nowrap;
}

.orderTimelineMeta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.orderTimelineDetail {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, .82);
}

@media (max-width: 960px) {

  .orderEditStats,
  .orderLedgerSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .orderEditGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #dlgPorosi .dlgCard {
    width: min(98vw, 98vw);
  }

  .orderEditSection {
    padding: 12px;
    border-radius: 16px;
  }

  .orderEditStats,
  .orderLedgerSummary {
    grid-template-columns: 1fr;
  }

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

.cityList {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  max-height: 340px;
  overflow: auto;
}

.cityItem {
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.cityItem:last-child {
  border-bottom: none
}

.cityItem:hover {
  background: rgba(254, 78, 14, .12);
  color: rgba(255, 255, 255, .96)
}

.formAssist {
  display: grid;
  gap: 10px;
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
}

.formAssistWarn {
  border-color: rgba(255, 204, 0, .22);
  background: linear-gradient(180deg, rgba(255, 204, 0, .08), rgba(255, 255, 255, .03));
}

.formAssistHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.dupList {
  display: grid;
  gap: 8px;
}

.dupItem {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
}

.dupMain {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dupTitle {
  font-weight: 900;
  color: rgba(255, 255, 255, .94);
  line-height: 1.15;
}

.dupMeta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dupActions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attachPanel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

.attachHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.attachHeadMain {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attachTitleRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attachPanel .miniTitle {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}

.attachTools {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.attachField {
  min-width: 170px;
  margin: 0;
}

.attachField select {
  min-width: 170px;
}

.attachUploadInput {
  display: none;
}

.attachHint {
  font-size: 12px;
  color: var(--muted);
}

.attachList {
  display: grid;
  gap: 10px;
}

.attachCard {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
}

.attachFile {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.attachName {
  font-weight: 900;
  line-height: 1.15;
  color: rgba(255, 255, 255, .95);
  word-break: break-word;
}

.attachMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.attachActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.attachEmpty {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
}

.attachPreviewModal {
  width: min(1100px, 96vw);
}

.attachPreviewStage {
  margin-top: 12px;
  padding: 12px;
  min-height: 320px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .24);
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachPreviewImage {
  display: block;
  max-width: 100%;
  max-height: min(74vh, 920px);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

.attachPreviewFrame {
  width: 100%;
  height: min(78vh, 940px);
  border: 0;
  border-radius: 12px;
  background: #ffffff;
}

.attachPreviewMeta {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .dupItem {
    flex-direction: column;
    align-items: stretch;
  }

  .dupActions {
    justify-content: flex-start;
  }

  .attachHead,
  .attachCard {
    flex-direction: column;
    align-items: stretch;
  }

  .attachTools,
  .attachActions {
    justify-content: flex-start;
  }

  .attachField,
  .attachField select {
    min-width: 0;
    width: 100%;
  }
}


/* iPhone / mobile layout: bottom navigation */
@media (max-width: 760px) {
  #view-newOrder .orderHeroHead {
    padding: 16px;
    border-radius: 18px;
  }

  #view-newOrder .orderHeroHead::before {
    left: 16px;
    top: 14px;
    width: 72px;
  }

  #view-newOrder .orderHeroIntro {
    min-width: 0;
    width: 100%;
    padding-top: 16px;
  }

  #view-newOrder .orderHeroIntro h1 {
    font-size: 26px;
  }

  #view-newOrder #orderForm>.row {
    bottom: calc(94px + env(safe-area-inset-bottom));
    padding: 8px;
  }

  .shell {
    padding: 12px
  }

  .side {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    padding: 10px;
    z-index: 50;
  }

  .brand {
    padding: 4px 2px 8px
  }

  .logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px
  }

  .logoGlyph {
    font-size: 17px
  }

  .logoAccent {
    width: 22px
  }

  .logoScan {
    left: 8px;
    right: 8px;
    bottom: 7px
  }

  .brandCopy {
    padding-top: 0
  }

  .side .brandName {
    font-size: 14px
  }

  .brandSub {
    display: none
  }

  .nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px
  }

  .navItem {
    justify-content: center;
    padding: 10px 8px;
    font-size: 12px
  }

  .navItem .dot {
    display: none
  }

  .navItem .count {
    display: none
  }

  .sideActions {
    display: none
  }

  .sideHint {
    display: none
  }

  .main {
    padding-bottom: 140px
  }

  .table {
    min-width: 860px
  }

  .fsFab {
    display: grid;
    bottom: calc(112px + env(safe-area-inset-bottom));
  }
}


.navLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0
}

.navItem .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}


/* --- Reports KPI + Charts (v24) --- */
.kpiGrid4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  /* 2 lart + 2 posht */
  gap: 12px;
  margin-top: 4px;
}

/* --- Dashboard (v99) --- */
.dashGrid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 1200px) {
  .dashGrid4 {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 650px) {
  .dashGrid4 {
    grid-template-columns: 1fr;
  }
}

.dashCard {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}

.dashCardTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.dashCardTitle {
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255, 255, 255, .92);
}

.dashBig {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: .2px;
  margin-bottom: 10px;
}

.dashSubGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dashMini {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dashMini span {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.15;
}

.dashMini b {
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .kpiGrid4 {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 650px) {
  .kpiGrid4 {
    grid-template-columns: 1fr;
  }
}

.kpiCard {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  padding: 12px 12px 10px;
  min-width: 0;
}

.kpiCard h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  color: rgba(255, 255, 255, .92);
}

.kpiTopRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.kpiTitle {
  font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 10px;
}

.kpiCardGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* Subscriptions KPI grid (4 → 2 → 1) */
.subsKpiGrid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

@media (max-width: 860px) {
  .subsKpiGrid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 520px) {
  .subsKpiGrid {
    grid-template-columns: 1fr;
  }
}

.kpiMini {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.kpiMiniLbl {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  margin: 0;
  white-space: normal;
  /* mos i pre me "..." */
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
}

.kpiMiniVal {
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}

.kpiBigRow {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kpiBig {
  flex: 1;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpiBigLbl {
  font-size: 12px;
  color: var(--muted);
}

.kpiBigVal {
  font-size: 18px;
  font-weight: 800;
}

.kpiSmallGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpiMiniGrid {
  /* alias used by reports renderer */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpiSmall {
  background: rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.kpiMini {
  /* alias used by reports renderer */
  background: rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.kpiMiniLbl {
  font-size: 12px;
  color: var(--muted);
}

.kpiMiniVal {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
}

.kpiSmall span {
  font-size: 12px;
  color: var(--muted);
}

.chartCanvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 12px;
  background: rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .06);
}


/* -------- Invoice Overlay (no popups) -------- */

.invoiceHost {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.invoiceHost.show {
  display: block;
}

.invBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding:
    calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  overflow: auto;
}

.invModal {
  width: min(980px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .55);
  overflow: hidden;
}

.invTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.invLangSel {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 900;
  outline: none;
}

.invLangSel option {
  color: #111827;
}

.invFrame {
  width: 100%;
  height: 1100px;
  border: 0;
  background: #fff;
}

/* NOTE (v115): use 980px breakpoint so mobile rules still apply even if
   the browser uses the classic 980px layout viewport (e.g., some in-app browsers
   or cached PWA states). */
@media (max-width: 980px) {
  .invFrame {
    height: 1000px;
  }
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* --- Customer history modal readability (v35) --- */
/* Classes used by customer history renderer */
.muted {
  color: var(--muted);
}

.strong {
  font-weight: 900;
  color: var(--text);
}

#dlgCustomer .dlgCard {
  color: rgba(255, 255, 255, .92);
}

#dlgCustomer .cardInner {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  border-radius: 14px;
  padding: 12px;
}

#dlgCustomer .miniTitle {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
  margin: 2px 0 10px;
}

#dlgCustomer .tableWrap {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

#dlgCustomer .table {
  color: rgba(255, 255, 255, .90);
}

#dlgCustomer .table td {
  color: rgba(255, 255, 255, .90);
}

#dlgCustomer .table th {
  color: rgba(255, 255, 255, .76);
}

#dlgCustomer .table td .muted {
  color: rgba(255, 255, 255, .64);
}

#dlgCustomer .table tr:hover td {
  background: rgba(255, 255, 255, .05);
}

#dlgCustomer .kpiRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 860px) {
  #dlgCustomer .kpiRow {
    grid-template-columns: 1fr;
  }
}

.btn.small {
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
}


/* Toast notifications (in-app) */
.toastWrap {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px));
}

.toast {
  background: rgba(17, 24, 39, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(var(--glassBlur));
  -webkit-backdrop-filter: blur(var(--glassBlur));
  border-radius: 16px;
  padding: 12px 12px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45)
}

.toastHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px
}

.toastBody {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.toastLine {
  font-size: 13px;
  line-height: 1.2
}

.toastFoot {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end
}

/* Tasks table emphasis */
.rowOverdue td {
  color: #fff
}

.rowOverdue {
  background: rgba(254, 78, 14, .10)
}

.rowDone {
  opacity: .65
}

.table td.actions {
  white-space: nowrap
}

.subBadge {
  margin-left: 8px;
  border: 1px solid rgba(52, 199, 89, .75);
  color: rgba(0, 0, 0, .86);
  background: rgba(52, 199, 89, .90)
}

.svcBadge {
  margin-left: 8px;
  border: 1px solid rgba(10, 132, 255, .95);
  color: #ffffff;
  background: rgba(10, 132, 255, .95)
}


/* Subscription reminders */
.badge.warnBadge {
  border-color: rgba(254, 78, 14, .95);
  color: #ffffff;
  background: rgba(254, 78, 14, .95);
}

/* Subscription checkbox */
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  font-size: 13px
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent)
}

/* Task meta line */
.taskMeta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center
}

.taskMeta .k {
  color: rgba(255, 255, 255, .45)
}

.taskMeta .dot {
  opacity: .4
}

.taskTitleLine {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.taskTitleLine .tTitle {
  font-weight: 850
}




/* v58 - Customer edit hotfix */
.checkLine {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  background: rgba(0, 0, 0, .18);
}

.checkLine input {
  width: 18px;
  height: 18px;
}

.subgrid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .subgrid2 {
    grid-template-columns: 1fr;
  }
}

.depositCard {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.depositCard[data-active="1"] {
  border-color: rgba(254, 78, 14, .35);
  box-shadow: 0 16px 36px rgba(254, 78, 14, .08);
  background: linear-gradient(180deg, rgba(254, 78, 14, .08), rgba(255, 255, 255, .03));
}

.depositCard[data-active="0"] .depositDetails {
  opacity: .42;
  filter: saturate(.72);
}

.depositCard[data-active="0"] .depositPanel {
  background: rgba(255, 255, 255, .015);
  border-color: rgba(255, 255, 255, .05);
}

.depositCard[data-active="0"] .depositDetails h3,
.depositCard[data-active="0"] .depositDetails .mini,
.depositCard[data-active="0"] .depositDetails .field label {
  color: rgba(255, 255, 255, .36);
}

.depositCard[data-active="0"] .depositDetails .field input,
.depositCard[data-active="0"] .depositDetails .field select {
  background: rgba(255, 255, 255, .02);
  border-color: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .36);
  box-shadow: none;
}

.depositCard[data-active="0"] .depositDetails .chip {
  border-color: rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
  color: rgba(255, 255, 255, .34);
  box-shadow: none;
}

.depositCard[data-active="0"] .depositDetails .chip[disabled],
.depositCard[data-active="0"] .depositDetails input[disabled],
.depositCard[data-active="0"] .depositDetails select[disabled] {
  cursor: not-allowed;
}

.depositCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.depositCardCopy {
  min-width: 0;
  flex: 1 1 320px;
}

.depositCardTitle {
  font-weight: 900;
  color: rgba(255, 255, 255, .94);
  line-height: 1.2;
}

.installmentCard {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
}

.installmentCard[data-active="1"] {
  border-color: rgba(254, 78, 14, .35);
  box-shadow: 0 16px 36px rgba(254, 78, 14, .08);
  background: linear-gradient(180deg, rgba(254, 78, 14, .08), rgba(255, 255, 255, .03));
}

.installmentCard[data-active="0"] .installmentDetails {
  opacity: .42;
  filter: saturate(.72);
}

.installmentCard[data-active="0"] .installmentDetails .field label {
  color: rgba(255, 255, 255, .36);
}

.installmentCard[data-active="0"] .installmentDetails .field input,
.installmentCard[data-active="0"] .installmentDetails .field select {
  background: rgba(255, 255, 255, .02);
  border-color: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .36);
  box-shadow: none;
}

.installmentCard[data-active="0"] .installmentDetails input[disabled],
.installmentCard[data-active="0"] .installmentDetails select[disabled] {
  cursor: not-allowed;
}

.installmentControlCenter {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.installmentControlCenter .row input[type="month"] {
  min-width: 170px;
}

.installmentCenterKpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.installmentKpi {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.installmentKpi span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.installmentKpi b {
  font-size: 17px;
  font-weight: 980;
  color: rgba(255, 255, 255, .95);
}

.installmentCenterCalendar {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 2px;
}

.instCalChip {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.instCalChip.overdue {
  border-color: rgba(255, 82, 82, .52);
  background: rgba(255, 82, 82, .16);
  color: #ffd7d7;
}

.instCalChip.today {
  border-color: rgba(255, 194, 49, .52);
  background: rgba(255, 194, 49, .18);
  color: #fff1c1;
}

.installmentCenterWrap {
  max-height: 360px;
  overflow: auto;
}

.instPayCell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.instPayCell input {
  width: 108px;
  min-width: 0;
}

.healthSummary {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, .84);
}

.healthSummary.ok {
  border-color: rgba(46, 204, 113, .44);
  background: rgba(46, 204, 113, .14);
  color: #dff7ea;
}

.healthSummary.warn {
  border-color: rgba(255, 196, 61, .44);
  background: rgba(255, 196, 61, .14);
  color: #fff5d8;
}

.healthSummary.error {
  border-color: rgba(255, 82, 82, .44);
  background: rgba(255, 82, 82, .14);
  color: #ffe4e4;
}

.healthIssuesWrap {
  max-height: 300px;
  overflow: auto;
}

.healthBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
}

.healthBadge.error {
  background: rgba(255, 82, 82, .16);
  border: 1px solid rgba(255, 82, 82, .42);
  color: #ffd9d9;
}

.healthBadge.warn {
  background: rgba(255, 196, 61, .16);
  border: 1px solid rgba(255, 196, 61, .42);
  color: #fff0c5;
}

.healthBadge.info {
  background: rgba(10, 132, 255, .16);
  border: 1px solid rgba(10, 132, 255, .42);
  color: #dbeeff;
}

.healthSummary.backupHealthSummary {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
}

.backupDiagnosticsPanel .healthIssuesWrap {
  max-height: 360px;
  overflow: auto;
}

.depositToggle {
  min-width: 280px;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.orderItemsToolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.orderItemsToolbar .mini {
  margin-left: auto;
}

.orderItemsList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.orderItemRow {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .16);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 130px auto;
  gap: 10px;
  align-items: center;
}

.orderItemName {
  font-weight: 900;
  color: rgba(255, 255, 255, .94);
}

.orderItemMeta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.orderItemQty input {
  min-width: 0;
  width: 100%;
  text-align: center;
}

.orderItemAmount {
  text-align: right;
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
}

.orderItemsEmpty {
  border: 1px dashed rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .02);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 780px) {
  .orderItemRow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .orderItemAmount {
    text-align: left;
  }

  .orderItemsToolbar .mini {
    margin-left: 0;
    width: 100%;
  }
}

.depositSummary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.depositMetric {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.depositMetric span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.depositMetric b {
  font-size: 15px;
  font-weight: 980;
  white-space: nowrap;
  color: rgba(255, 255, 255, .94);
}

.depositMetric.accent {
  border-color: rgba(254, 78, 14, .24);
  background: rgba(254, 78, 14, .10);
}

.depositQuickRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.depositPanel {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
}

.depositDetails {
  display: grid;
  gap: 12px;
  transition: opacity .18s ease, filter .18s ease;
}

@media (max-width: 760px) {
  .depositSummary {
    grid-template-columns: 1fr;
  }

  .depositToggle {
    min-width: 0;
    width: 100%;
  }

  .installmentCenterKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .installmentCenterWrap {
    max-height: unset;
  }

  .instPayCell {
    flex-wrap: wrap;
  }

  .instPayCell input {
    width: 100%;
  }
}


/* ===== Theme: Light (Day) ===== */
html[data-theme="light"] {
  --bg: #F5F7FB;
  --card: rgba(255, 255, 255, .78);
  --stroke: rgba(15, 20, 30, .10);
  --text: rgba(15, 20, 30, .92);
  --muted: rgba(15, 20, 30, .58);
  --shadow: 0 14px 38px rgba(15, 20, 30, .16);
}

html[data-theme="light"] body {
  background:
    radial-gradient(900px 420px at 12% 8%, rgba(254, 78, 14, .10), rgba(254, 78, 14, 0) 55%),
    radial-gradient(900px 420px at 78% 10%, rgba(77, 124, 254, .10), rgba(77, 124, 254, 0) 60%),
    radial-gradient(900px 520px at 35% 85%, rgba(0, 0, 0, .04), rgba(0, 0, 0, 0) 60%),
    var(--bg);
}

html[data-theme="light"] .installmentKpi,
html[data-theme="light"] .healthSummary {
  border-color: rgba(15, 20, 30, .12);
  background: rgba(255, 255, 255, .75);
  color: rgba(15, 20, 30, .88);
}

html[data-theme="light"] .installmentKpi span {
  color: rgba(15, 20, 30, .58);
}

html[data-theme="light"] .installmentKpi b {
  color: rgba(15, 20, 30, .92);
}

html[data-theme="light"] .instCalChip {
  border-color: rgba(15, 20, 30, .12);
  background: rgba(15, 20, 30, .05);
  color: rgba(15, 20, 30, .86);
}

html[data-theme="light"] .instCalChip.overdue {
  border-color: rgba(219, 54, 54, .38);
  background: rgba(219, 54, 54, .11);
  color: #8a1d1d;
}

html[data-theme="light"] .instCalChip.today {
  border-color: rgba(184, 131, 5, .38);
  background: rgba(184, 131, 5, .12);
  color: #7b5700;
}

html[data-theme="light"] .side {
  background:
    radial-gradient(circle at 18% 8%, rgba(254, 78, 14, .12), transparent 32%),
    radial-gradient(circle at 86% 10%, rgba(77, 124, 254, .10), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78));
}

html[data-theme="light"] .navSep {
  background: rgba(0, 0, 0, .08);
}

html[data-theme="light"] .navItem .dot {
  background: rgba(0, 0, 0, .22);
}

html[data-theme="light"] .navItem,
html[data-theme="light"] .chip,
html[data-theme="light"] .search,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .check,
html[data-theme="light"] .panel,
html[data-theme="light"] .dashCard,
html[data-theme="light"] .dashMini,
html[data-theme="light"] .kpiCard,
html[data-theme="light"] .kpiMini,
html[data-theme="light"] .tableWrap,
html[data-theme="light"] .iconbtn,
html[data-theme="light"] .cityList,
html[data-theme="light"] .sideHint {
  background: rgba(255, 255, 255, .72) !important;
  border-color: rgba(0, 0, 0, .10) !important;
  color: var(--text) !important;
}

html[data-theme="light"] .field select option {
  background: #fff;
  color: rgba(15, 20, 30, .92);
}

html[data-theme="light"] .dashCardTitle,
html[data-theme="light"] .dashBig,
html[data-theme="light"] .dashMini b {
  color: rgba(15, 20, 30, .92) !important;
}

html[data-theme="light"] .dashMini span {
  color: rgba(15, 20, 30, .58) !important;
}

html[data-theme="light"] .navItem.active {
  border-color: color-mix(in srgb, var(--accent) 55%, #000 0%) !important;
  background: color-mix(in srgb, var(--accent) 14%, #fff 86%) !important;
}

html[data-theme="light"] .chip {
  color: rgba(15, 20, 30, .62) !important;
}

html[data-theme="light"] .chip.active {
  color: rgba(15, 20, 30, .92) !important;
}

html[data-theme="light"] .table th {
  color: rgba(0, 0, 0, .72);
}

html[data-theme="light"] .table td {
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

html[data-theme="light"] .table tr:hover td {
  background: rgba(0, 0, 0, .03);
}

html[data-theme="light"] .mini {
  color: rgba(0, 0, 0, .55);
}

html[data-theme="light"] .dlg::backdrop {
  background: rgba(0, 0, 0, .35);
}

html[data-theme="light"] .dlgCard {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(0, 0, 0, .10);
}

/* ===== Auth Gate (Full-page Login) ===== */
.authGate {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.6vw, 28px);
  background:
    radial-gradient(900px 520px at 16% 10%, rgba(254, 78, 14, .16), rgba(254, 78, 14, 0) 60%),
    radial-gradient(980px 620px at 82% 18%, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0) 60%),
    rgba(0, 0, 0, .68);
  backdrop-filter: blur(var(--glassBlur));
  overflow: hidden;
}

.authGlowCircle {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  transition: opacity 0.5s ease;
}

.authGlowCircle.glow1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -100px;
  left: -100px;
}

.authGlowCircle.glow2 {
  width: 600px;
  height: 600px;
  background: rgba(77, 124, 254, 0.4);
  bottom: -150px;
  right: -100px;
}

.authGateOpen .authGlowCircle.glow1 {
  animation: glowFloat1 18s ease-in-out infinite alternate;
}

.authGateOpen .authGlowCircle.glow2 {
  animation: glowFloat2 24s ease-in-out infinite alternate;
}

#authGateTitle {
  opacity: 0;
  transform: translateY(12px);
}

#authGateSub {
  opacity: 0;
  transform: translateY(8px);
}

.authGateOpen #authGateTitle {
  animation: titleRevealAnim 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.25s;
}

.authGateOpen #authGateSub {
  animation: subtitleRevealAnim 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.35s;
}

.authGate.hidden {
  display: none;
}

.authPage {
  width: min(1120px, 96vw);
  height: min(640px, 92vh);
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 420px 1fr;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  position: relative;
  
  /* Intro Animation Init */
  opacity: 0;
  transform: translateY(24px) scale(0.985);
}

.authGateOpen .authPage {
  animation: authPageIntro 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.authPage.shake {
  animation: shakeCard 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

#authHeroLine {
  stroke-dasharray: 270;
  stroke-dashoffset: 270;
}

#authHeroArea {
  opacity: 0;
}

#authHeroDot {
  transform: scale(0);
  transform-origin: 368px 140px;
}

.authGateOpen #authHeroLine {
  animation: drawLine 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.5s;
}

.authGateOpen #authHeroArea {
  animation: fadeInArea 1s ease forwards;
  animation-delay: 1.8s;
}

.authGateOpen #authHeroDot {
  animation: scaleDot 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1.7s;
}

.authLeft {
  padding: 28px 28px 22px 28px;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.45), rgba(10, 12, 18, 0.58));
  border-right: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(var(--glassBlur));
  display: flex;
  flex-direction: column;
}

.authHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.authControls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.authRight {
  position: relative;
  background:
    radial-gradient(900px 420px at 70% 22%, rgba(254, 78, 14, .28), rgba(254, 78, 14, 0) 60%),
    radial-gradient(900px 520px at 40% 75%, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 62%);
}

.authBrand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.authLogo {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}

.authLogo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.authApp {
  font-weight: 950;
  letter-spacing: .2px;
  font-size: 16px;
}

.authHint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.authTabs {
  display: flex;
  gap: 10px;
  margin: 8px 0 18px 0;
}

.authTab {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .85);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  cursor: default;
}

.authTab.active {
  background: rgba(254, 78, 14, .18);
  border-color: rgba(254, 78, 14, .30);
  color: #fff;
}

.authTab:disabled {
  opacity: .45;
}

.authTitle {
  font-size: 22px;
  font-weight: 950;
  margin: 6px 0 6px 0;
}

.authSub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.authForm .field {
  margin-bottom: 12px;
}

.authForm input {
  width: 100%;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .26);
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.authForm input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, .42);
  box-shadow: 0 0 14px rgba(254, 78, 14, .32);
}

.authTopRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.authThemeBtn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.authThemeBtn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.pinWrap {
  position: relative;
  width: 100%;
}

.pinWrap input {
  padding-right: 44px;
}

.pinToggleBtn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.pinToggleBtn:hover {
  color: var(--text);
}

.authLinks {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 16px;
}

.authInstallHint {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  display: grid;
  gap: 6px;
}

.authInstallTitle {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .88);
}

.authInstallLine {
  font-size: 13px;
  line-height: 1.38;
  color: rgba(255, 255, 255, .78);
}

.authInstallLine b {
  color: rgba(255, 255, 255, .94);
}

.authInstallMeta {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .58);
}

.linkBtn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .60);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.linkBtn:hover {
  color: var(--accent);
  text-decoration: none;
}

.authBtn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  height: 50px;
  padding: 12px 14px;
  font-weight: 950;
  letter-spacing: .2px;
  cursor: pointer;
  color: #0B1220;
  background:
    radial-gradient(140% 160% at 30% 0%, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 45%),
    var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3), 0 0 0 0 rgba(254, 78, 14, 0);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.authBtn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .4), 0 0 20px var(--accent);
}

.authBtn:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

.authBtn:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(254, 78, 14, 0.4), 0 12px 30px rgba(0, 0, 0, .3);
}

.authBtn .spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(11, 18, 32, 0.25);
  border-top-color: #0b1220;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
}

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

.authRow {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
}

.authRow .btn {
  flex: 1;
}

.authHero {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 34px 28px 34px;
  position: relative;
}

.authHero::before {
  content: "";
  position: absolute;
  inset: -120px -140px auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%);
  border-radius: 50%;
  filter: blur(0px);
  opacity: .9;
  pointer-events: none;
}

.authHero::after {
  content: "";
  position: absolute;
  inset: auto auto -140px -140px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 35% 35%, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0) 60%);
  border-radius: 50%;
  pointer-events: none;
}

.heroBadge {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .22);
  color: rgba(255, 255, 255, .82);
  font-weight: 850;
  font-size: 12px;
}

.heroTitle {
  font-size: 34px;
  font-weight: 950;
  margin: 14px 0 8px 0;
  line-height: 1.12;
}

.heroSub {
  color: rgba(255, 255, 255, .70);
  font-size: 13px;
  margin-bottom: 18px;
}

.heroArt {
  margin-top: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
  padding: 16px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .35);
  max-width: 680px;
}

.heroSvg {
  width: 100%;
  height: auto;
  display: block;
}

.heroFooter {
  position: absolute;
  bottom: 14px;
  right: 20px;
  color: var(--muted);
  font-size: 10.5px;
  opacity: 0.35;
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Auth Gate Animations */
@keyframes authPageIntro {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeInArea {
  to {
    opacity: 0.10;
  }
}

@keyframes scaleDot {
  to {
    transform: scale(1);
  }
}

@keyframes shakeCard {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

@media (max-width: 980px) {
  .authPage {
    grid-template-columns: 1fr;
    height: auto;
  }

  .authRight {
    display: none;
  }
}

/* Light theme */
html[data-theme="light"] .authGate {
  background:
    radial-gradient(900px 520px at 16% 10%, rgba(254, 78, 14, .14), rgba(254, 78, 14, 0) 60%),
    radial-gradient(980px 620px at 82% 18%, rgba(77, 124, 254, .12), rgba(77, 124, 254, 0) 60%),
    rgba(16, 22, 34, .18);
  backdrop-filter: blur(var(--glassBlur));
}

html[data-theme="light"] .authPage {
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .22);
}

html[data-theme="light"] .authForm input {
  border-color: rgba(0, 0, 0, .12);
  background: rgba(255, 255, 255, .85);
  color: #000;
}

html[data-theme="light"] .authForm input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 12px rgba(254, 78, 14, .18);
}

html[data-theme="light"] .authThemeBtn {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.70);
}

html[data-theme="light"] .authThemeBtn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .pinToggleBtn {
  color: rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .pinToggleBtn:hover {
  color: rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] .authInstallHint {
  border-color: rgba(0, 0, 0, .08);
  background: rgba(0, 0, 0, .03);
}

html[data-theme="light"] .authInstallTitle {
  color: rgba(0, 0, 0, .82);
}

html[data-theme="light"] .authInstallLine {
  color: rgba(0, 0, 0, .70);
}

html[data-theme="light"] .authInstallLine b {
  color: rgba(0, 0, 0, .88);
}

html[data-theme="light"] .authInstallMeta {
  color: rgba(0, 0, 0, .52);
}

html[data-theme="light"] .authLeft {
  background: rgba(255, 255, 255, .88);
  border-right-color: rgba(0, 0, 0, .08);
}

html[data-theme="light"] .authRight {
  background:
    radial-gradient(900px 420px at 70% 22%, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0) 60%),
    radial-gradient(900px 520px at 40% 75%, rgba(0, 0, 0, .04), rgba(0, 0, 0, 0) 62%);
}

html[data-theme="light"] .linkBtn {
  color: rgba(0, 0, 0, .55);
}

html[data-theme="light"] .linkBtn:hover {
  color: rgba(0, 0, 0, .82);
}

html[data-theme="light"] .heroBadge {
  background: rgba(255, 255, 255, .60);
  color: rgba(0, 0, 0, .70);
  border-color: rgba(0, 0, 0, .10);
}

html[data-theme="light"] .heroSub {
  color: rgba(0, 0, 0, .55);
}

html[data-theme="light"] .heroFooter {
  color: rgba(0, 0, 0, .45);
}



/* Logout button in sidebar (shown only when login enabled & authed) */
.logoutBtn {
  width: 100%;
  display: none;
  justify-content: center;
  gap: 8px
}

.logoutBtn.show {
  display: inline-flex
}


/* --- Dashboard Ultra (v100) --- */
.dashV2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.dashHero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(900px 420px at 18% 25%, rgba(231, 213, 183, .10), rgba(231, 213, 183, 0) 60%),
    radial-gradient(900px 420px at 82% 20%, rgba(77, 124, 254, .10), rgba(77, 124, 254, 0) 60%),
    linear-gradient(135deg, rgba(254, 78, 14, .22), rgba(255, 255, 255, .035) 55%, rgba(0, 0, 0, .16));
  position: relative;
  overflow: hidden;
}

.dashHero:before {
  content: "";
  position: absolute;
  inset: -40px -80px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .14), rgba(254, 78, 14, .18), transparent 65%);
  opacity: .9;
  pointer-events: none;
}

.dashHeroLeft {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.dashHeroRight {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.dashKicker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 900;
}

.dashTitle {
  font-size: 30px;
  font-weight: 1000;
  margin-top: 2px;
  letter-spacing: .2px;
  line-height: 1.05;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.dashTitle .brandMark {
  color: rgba(254, 78, 14, .98);
  text-shadow: 0 10px 26px rgba(254, 78, 14, .20);
}

.dashTitle .brandX {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 10px 26px rgba(0, 0, 0, .30);
}

.dashSubLine {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, .70);
  line-height: 1.35
}

@media (max-width: 650px) {
  .dashTitle {
    font-size: 24px;
  }
}

.dashSubLine b {
  color: rgba(255, 255, 255, .92)
}

.dashPills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .14);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 900;
}

.pill.accent {
  border-color: rgba(254, 78, 14, .45);
  background: rgba(254, 78, 14, .14);
  color: rgba(255, 255, 255, .94);
}

.dashActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actionTile {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .16);
  color: rgba(255, 255, 255, .92);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 950;
  font-size: 12px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.actionTile:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .04);
}

.actionTile.primary {
  border-color: rgba(254, 78, 14, .45);
  background: rgba(254, 78, 14, .18);
}

.dashKpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 12px;
}

@media (max-width: 1200px) {
  .dashKpis {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }
}

@media (max-width: 650px) {
  .dashHero {
    align-items: flex-start
  }

  .dashHeroRight {
    align-items: flex-start
  }

  .dashPills {
    justify-content: flex-start
  }

  .dashActions {
    justify-content: flex-start
  }

  .dashKpis {
    grid-template-columns: 1fr;
  }
}


/* Dashboard KPI cards: keep uniform height + consistent alignment */
.dashKpis .kpiV2 {
  min-height: 152px;
  display: flex;
  flex-direction: column;
}

.dashKpis .kpiBottom {
  margin-top: auto;
}

.dashKpis .kpiTag {
  min-width: 72px;
  text-align: center;
  flex: 0 0 auto;
}


.kpiV2 {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  padding: 14px;
  min-width: 0;
}

.kpiV2:before {
  content: "";
  position: absolute;
  inset: -60px auto auto -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(254, 78, 14, .25), transparent 70%);
  opacity: .55;
  pointer-events: none;
}

.kpiV2.kpiStock:before {
  background: radial-gradient(circle at 30% 30%, rgba(52, 199, 89, .22), transparent 70%);
}

.kpiTop {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kpiIcon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(254, 78, 14, .16);
  border: 1px solid rgba(254, 78, 14, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  flex: 0 0 auto;
}

.kpiStock .kpiIcon {
  background: rgba(52, 199, 89, .12);
  border-color: rgba(52, 199, 89, .25);
}

.kpiIcon svg {
  width: 22px;
  height: 22px;
}

.kpiMeta {
  min-width: 0;
}

.kpiLabel {
  font-weight: 980;
  letter-spacing: .2px;
}

.kpiHint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.kpiTag {
  margin-left: auto;
}

.kpiTagNum {
  font-weight: 990;
  margin-right: 4px;
}

.kpiValue {
  font-size: 30px;
  font-weight: 990;
  margin-top: 10px;
  letter-spacing: .2px;
}

.kpiBottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.kpiStat {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.kpiStat span {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.15
}

.kpiStat b {
  font-weight: 980;
  font-size: 14px;
  white-space: nowrap;
}

.dashGrid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.dashMain {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashSide {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 1000px) {
  .dashGrid {
    grid-template-columns: 1fr;
  }

  .dashSide {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px;
  }

  .dashSide .dashCardV2:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .dashSide {
    grid-template-columns: 1fr;
  }
}

.dashCardV2 {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  padding: 14px;
  min-width: 0;
}

.dashCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashCardHead h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 980;
  color: rgba(255, 255, 255, .92);
}

.dashChartWrap {
  margin-top: 6px;
}

.dashCanvas {
  display: block;
  width: 100%;
  height: 255px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .06);
}

.bucketWrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.bucketRowTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bucketLabel {
  color: rgba(255, 255, 255, .75);
  font-weight: 900;
  font-size: 12px;
}

.bucketVal {
  font-weight: 980;
  font-size: 13px;
}

.bucketBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
  margin-top: 7px;
}

.bucketBar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: rgba(254, 78, 14, .75);
}

.debtorList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.debtorItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.debtorItem:first-child {
  border-top: none;
}

.debtorLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(254, 78, 14, .16);
  border: 1px solid rgba(254, 78, 14, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 980;
  font-size: 12px;
  color: rgba(255, 255, 255, .95);
  flex: 0 0 auto;
}

.debtorName {
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.debtorAmt {
  font-weight: 980;
  white-space: nowrap;
  color: rgba(255, 255, 255, .92);
}

.stockList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stockItem {
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(0, 0, 0, .10);
  border-radius: 14px;
}

.stockTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.stockName {
  font-weight: 900;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.stockQty {
  font-weight: 980;
  color: rgba(255, 255, 255, .88);
  white-space: nowrap;
  font-size: 12px;
}

.stockBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
  margin-top: 8px;
}

.stockBar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 59, 48, .55);
}

.emptyState {
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .72);
  background: rgba(0, 0, 0, .10);
}

/* Light theme tweaks for Dashboard Ultra */
html[data-theme="light"] .dashHero {
  border-color: rgba(11, 18, 32, .10);
  background:
    radial-gradient(900px 420px at 18% 25%, rgba(231, 213, 183, .08), rgba(231, 213, 183, 0) 60%),
    radial-gradient(900px 420px at 82% 20%, rgba(77, 124, 254, .08), rgba(77, 124, 254, 0) 60%),
    linear-gradient(135deg, rgba(254, 78, 14, .16), rgba(255, 255, 255, .92) 55%, rgba(245, 247, 251, 1));
}

html[data-theme="light"] .dashKicker {
  color: rgba(11, 18, 32, .55)
}

html[data-theme="light"] .dashSubLine {
  color: rgba(11, 18, 32, .62)
}

html[data-theme="light"] .dashSubLine b {
  color: rgba(11, 18, 32, .92)
}

html[data-theme="light"] .pill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .85);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] .productHeroHead {
  border-color: rgba(11, 18, 32, .10);
  background:
    radial-gradient(circle at 12% 16%, rgba(254, 78, 14, .10), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(77, 124, 254, .08), transparent 26%),
    linear-gradient(135deg, rgba(254, 78, 14, .10), rgba(255, 255, 255, .95) 50%, rgba(245, 247, 251, 1));
}

html[data-theme="light"] .productHeroEyebrow {
  color: rgba(11, 18, 32, .55);
}

html[data-theme="light"] #view-newProduct .productHeroIntro .sub {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] .productEntryHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] .productEntryHeroPill b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] .productEntryHeroPillMuted,
html[data-theme="light"] .productEntryActionMeta,
html[data-theme="light"] .productBehaviorSummary,
html[data-theme="light"] .productBundleBuilderMeta,
html[data-theme="light"] .productBundleInfoMeta,
html[data-theme="light"] .productConfigSummaryEmpty,
html[data-theme="light"] .productConfigSummaryItem small {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .productGuideCard,
html[data-theme="light"] .productPanel {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
}

html[data-theme="light"] .productGuideCard strong,
html[data-theme="light"] .productPanelHead h3 {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] .productGuideCard span,
html[data-theme="light"] .productPanelHead p,
html[data-theme="light"] .productPanelNote {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .productBehaviorSummary,
html[data-theme="light"] .productBundleBuilderHead,
html[data-theme="light"] .productConfigSummaryItem,
html[data-theme="light"] .productConfigSummaryEmpty {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .88);
}

html[data-theme="light"] .productBundleBuilderHead span:first-child,
html[data-theme="light"] .productConfigSummaryItem span {
  color: rgba(11, 18, 32, .56);
}

html[data-theme="light"] .productConfigSummaryItem b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-newDebt .debtEntryHead .productHeroIntro .sub {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] #view-newCustomer .customerEntryHead .sub {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] #view-newPayment .paymentEntryHead .sub {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] .customerEntryHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] .debtEntryHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] .paymentEntryHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] .customerEntryHeroPill b,
html[data-theme="light"] .customerEntryContextTitle,
html[data-theme="light"] .customerDuplicateTitle,
html[data-theme="light"] .customerEntryContextMetric b,
html[data-theme="light"] .customerDuplicateIdentity strong {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] .debtEntryHeroPill b,
html[data-theme="light"] .debtContextTitle,
html[data-theme="light"] .debtSummaryTitle,
html[data-theme="light"] .debtContextMetric b,
html[data-theme="light"] .debtSummaryItem b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] .paymentEntryHeroPill b,
html[data-theme="light"] .paymentContextTitle,
html[data-theme="light"] .paymentContextMetric b,
html[data-theme="light"] .paymentSummaryItem b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] .customerEntryHeroPillMuted,
html[data-theme="light"] .customerEntryEyebrow,
html[data-theme="light"] .customerEntryContextNote,
html[data-theme="light"] .customerDuplicateEmpty,
html[data-theme="light"] .customerDuplicateIdentity span,
html[data-theme="light"] .customerFormActionMeta {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .debtEntryHeroPillMuted,
html[data-theme="light"] .debtContextEyebrow,
html[data-theme="light"] .debtSummaryEyebrow,
html[data-theme="light"] .debtContextMetric span,
html[data-theme="light"] .debtSummaryItem span,
html[data-theme="light"] .debtContextNote,
html[data-theme="light"] .debtSummaryNote,
html[data-theme="light"] .debtFormActionMeta {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .paymentEntryHeroPillMuted,
html[data-theme="light"] .paymentContextEyebrow,
html[data-theme="light"] .paymentContextMetric span,
html[data-theme="light"] .paymentSummaryItem span,
html[data-theme="light"] .paymentContextNote,
html[data-theme="light"] .paymentFormActionMeta {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .debtClientContextCard,
html[data-theme="light"] .debtQuickSummaryCard {
  border-color: rgba(11, 18, 32, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .92)),
    radial-gradient(circle at top right, rgba(77, 124, 254, .08), transparent 34%);
  box-shadow: none;
}

html[data-theme="light"] .debtQuickSummaryCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .92)),
    radial-gradient(circle at top right, rgba(52, 199, 89, .08), transparent 34%);
}

html[data-theme="light"] .paymentClientContextCard,
html[data-theme="light"] .paymentLinkContextCard,
html[data-theme="light"] .paymentQuickSummaryCard {
  border-color: rgba(11, 18, 32, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .92)),
    radial-gradient(circle at top right, rgba(77, 124, 254, .08), transparent 34%);
  box-shadow: none;
}

html[data-theme="light"] .paymentQuickSummaryCard {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .92)),
    radial-gradient(circle at top right, rgba(52, 199, 89, .08), transparent 34%);
}

html[data-theme="light"] .debtContextMetric,
html[data-theme="light"] .debtSummaryItem {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .96);
}

html[data-theme="light"] .paymentContextMetric,
html[data-theme="light"] .paymentSummaryItem {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .96);
}

html[data-theme="light"] .productGuideCard[data-active="1"],
html[data-theme="light"] .productTogglePanel[data-active="1"] {
  border-color: rgba(254, 78, 14, .20);
  background: linear-gradient(180deg, rgba(254, 78, 14, .08), rgba(255, 255, 255, .96));
  box-shadow: 0 12px 28px rgba(254, 78, 14, .08);
}

html[data-theme="light"] .productBundleRows .row {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, 1);
}

html[data-theme="light"] .actionTile {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  color: rgba(11, 18, 32, .90);
}

html[data-theme="light"] .actionTile:hover {
  background: rgba(255, 255, 255, 1)
}

html[data-theme="light"] .kpiV2,
html[data-theme="light"] .dashCardV2 {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
}

html[data-theme="light"] .kpiHint,
html[data-theme="light"] .kpiStat span,
html[data-theme="light"] .bucketLabel {
  color: rgba(11, 18, 32, .62)
}

html[data-theme="light"] .dashCanvas {
  background: rgba(245, 247, 251, 1);
  border-color: rgba(11, 18, 32, .08);
}

html[data-theme="light"] .emptyState {
  border-color: rgba(11, 18, 32, .14);
  color: rgba(11, 18, 32, .72);
  background: rgba(245, 247, 251, 1);
}

html[data-theme="light"] .moduleProLayout>.moduleHeroHead {
  border-color: rgba(11, 18, 32, .10);
  background:
    radial-gradient(circle at 12% 16%, rgba(254, 78, 14, .10), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(77, 124, 254, .08), transparent 30%),
    linear-gradient(135deg, rgba(254, 78, 14, .10), rgba(255, 255, 255, .95) 52%, rgba(245, 247, 251, 1));
}

html[data-theme="light"] .moduleProLayout>.moduleHeroHead .productHeroEyebrow {
  color: rgba(11, 18, 32, .56);
}

html[data-theme="light"] .moduleProLayout>.moduleHeroHead .productHeroIntro .sub {
  color: rgba(11, 18, 32, .66);
}

html[data-theme="light"] .moduleProLayout>.moduleHeroHead .invTools {
  border-top-color: rgba(11, 18, 32, .08);
}

html[data-theme="light"] .moduleProLayout>.moduleChips,
html[data-theme="light"] .moduleProLayout>.moduleTableSurface {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .90);
}

html[data-theme="light"] .moduleProLayout>.moduleTableSurface .table th {
  background: rgba(245, 247, 251, .96);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] .moduleProLayout>.moduleTableSurface .table td {
  color: rgba(11, 18, 32, .90);
}

html[data-theme="light"] .moduleProLayout>.moduleTableSurface .table tr:hover td {
  background: rgba(11, 18, 32, .03);
}

/* --- Dashboard Luxury Add-ons (v101) --- */
.luxDash .dashCardV2,
.luxDash .kpiV2 {
  position: relative;
  overflow: hidden;
}

.luxDash .dashCardV2 {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .18));
}

.luxDash .dashCardV2::before {
  content: "";
  position: absolute;
  inset: -140px -160px auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 30% 30%, rgba(231, 213, 183, .22), rgba(254, 78, 14, .16), rgba(255, 255, 255, 0) 62%);
  opacity: .55;
  pointer-events: none;
}

.luxDash .dashCardV2::after {
  content: "";
  position: absolute;
  inset: auto auto -180px -180px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 35% 35%, rgba(77, 124, 254, .14), rgba(255, 255, 255, 0) 62%);
  opacity: .45;
  pointer-events: none;
}

.luxDash .dashCardV2>* {
  position: relative;
  z-index: 1;
}

.goalsCard {
  border-color: rgba(231, 213, 183, .18);
}

.dashRow2 {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

@media (max-width: 1000px) {
  .dashRow2 {
    grid-template-columns: 1fr;
  }
}

/* Recent activity feed */
.activityList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activityItem {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .10);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.activityItem:hover {
  transform: translateY(-1px);
  border-color: rgba(231, 213, 183, .18);
  background: rgba(255, 255, 255, .03);
}

.activityIcon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background:
    radial-gradient(140% 160% at 30% 0%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 45%),
    rgba(254, 78, 14, .16);
  border: 1px solid rgba(254, 78, 14, .22);
  color: rgba(255, 255, 255, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.activityIcon svg {
  width: 22px;
  height: 22px;
}

.activityMid {
  min-width: 0;
  flex: 1;
}

.activityTop {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.activityTitle {
  font-weight: 980;
  font-size: 12px;
  letter-spacing: .2px;
}

.activityTag {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(231, 213, 183, .18);
  background: rgba(231, 213, 183, .10);
  color: rgba(255, 255, 255, .88);
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.activitySub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activityTime {
  font-size: 11px;
  color: var(--muted);
  font-weight: 950;
  letter-spacing: .2px;
}

/* Top products */
.topProdList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topProdItem {
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .10);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.topProdItem:hover {
  border-color: rgba(254, 78, 14, .24);
  background: rgba(254, 78, 14, .08);
  transform: translateY(-1px);
}

.topProdItem:focus-visible {
  outline: none;
  border-color: rgba(254, 78, 14, .34);
  box-shadow: 0 0 0 3px rgba(254, 78, 14, .14);
}

.topProdTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.topProdName {
  font-weight: 950;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.topProdRev {
  font-weight: 990;
  color: rgba(255, 255, 255, .92);
  white-space: nowrap;
}

.topProdMeta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.topProdBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
  margin-top: 8px;
}

.topProdBar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(254, 78, 14, .85), rgba(231, 213, 183, .62));
}

/* Goals */
.goalsWrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goalRow {
  padding: 10px 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .10);
}

.goalTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.goalLabel {
  font-weight: 950;
  font-size: 12px;
  color: rgba(255, 255, 255, .78);
}

.goalNums {
  font-size: 12px;
  color: rgba(255, 255, 255, .68);
}

.goalNums b {
  color: rgba(255, 255, 255, .95);
}

.goalBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
  margin-top: 8px;
}

.goalBar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(254, 78, 14, .90), rgba(77, 124, 254, .50), rgba(231, 213, 183, .55));
}

.goalMeta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.goalHint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.goalHint b {
  color: rgba(255, 255, 255, .92);
}

.goalForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goalGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.goalField label {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, .68);
  font-weight: 950;
  margin-bottom: 6px;
  letter-spacing: .2px;
}

.goalInput {
  width: 100%;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .16);
  color: var(--text);
  font-weight: 950;
}

.goalInput:focus {
  outline: none;
  border-color: rgba(231, 213, 183, .30);
  box-shadow: 0 0 0 4px rgba(231, 213, 183, .10);
}

.goalBtns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn.small {
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* Light theme tweaks */
html[data-theme="light"] .activityItem,
html[data-theme="light"] .topProdItem,
html[data-theme="light"] .goalRow {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
}

html[data-theme="light"] .activitySub,
html[data-theme="light"] .topProdMeta,
html[data-theme="light"] .goalNums,
html[data-theme="light"] .goalMeta,
html[data-theme="light"] .goalHint {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .activityTitle,
html[data-theme="light"] .topProdName,
html[data-theme="light"] .topProdRev,
html[data-theme="light"] .goalNums b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] .activityTag {
  color: rgba(11, 18, 32, .78);
}

html[data-theme="light"] .goalInput {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, 1);
  color: rgba(11, 18, 32, .92);
}

/* Light theme: keep fullscreen buttons readable */
html[data-theme="light"] .fsFab {
  border-color: rgba(0, 0, 0, .12);
  background: linear-gradient(135deg, rgba(254, 78, 14, .12), rgba(231, 213, 183, .08));
  box-shadow: 0 16px 36px rgba(0, 0, 0, .12), 0 16px 36px rgba(254, 78, 14, .08);
}

/* --- Dashboard Clean Luxury (v103) --- */
#view-dashboard .headRight {
  display: none;
}

.dashV2.cleanLux {
  max-width: 1220px;
  margin: 0 auto;
}

.cleanLux .dashHero {
  padding: 14px 16px;
  border-radius: 18px;
  background:
    radial-gradient(900px 420px at 18% 18%, rgba(254, 78, 14, .16), rgba(254, 78, 14, 0) 60%),
    radial-gradient(900px 520px at 86% 16%, rgba(77, 124, 254, .12), rgba(77, 124, 254, 0) 60%),
    radial-gradient(900px 520px at 55% 90%, rgba(231, 213, 183, .10), rgba(231, 213, 183, 0) 62%),
    rgba(255, 255, 255, .02);
}

.cleanLux .dashHero:before {
  opacity: .35;
}

/* reduce "busy" glows per-card – keep page luxury instead */
.cleanLux.luxDash .dashCardV2::before,
.cleanLux.luxDash .dashCardV2::after {
  content: none;
}

.cleanGrid {
  grid-template-columns: 1fr 360px;
}

@media (max-width: 1000px) {
  .cleanGrid {
    grid-template-columns: 1fr;
  }
}

/* compact quick actions */
.dashActions.compact {
  gap: 8px;
}

.miniAction {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .14);
  color: rgba(255, 255, 255, .92);
  padding: 9px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 950;
  font-size: 12px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.miniAction:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .04);
}

.miniAction.primary {
  border-color: rgba(254, 78, 14, .45);
  background: rgba(254, 78, 14, .16);
}

.miniAction.ghost {
  background: rgba(255, 255, 255, .03);
}

/* Segmented tabs */
.segTabs {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .14);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}

.segTabs.small {
  transform: scale(.95);
  transform-origin: right top;
}

.seg {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 950;
  font-size: 12px;
}

.seg:hover {
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .04);
}

.seg.on {
  border-color: rgba(254, 78, 14, .45);
  background: rgba(254, 78, 14, .14);
  color: rgba(255, 255, 255, .96);
}


/* --- Dashboard: stretch Borxhlinjtë & Stock to fill column (v130) --- */
@media (min-width: 1001px) {
  .dashSide {
    height: 100%;
  }

  .dashSide .peopleStockCard {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  .dashSide .peopleStockCard .dashScroll {
    flex: 1 1 auto;
    max-height: none;
  }

  .dashSide .peopleStockCard .tabFoot {
    margin-top: 12px;
  }
}

.peopleStockCard {
  background:
    radial-gradient(720px 260px at 14% 14%, rgba(254, 78, 14, .12), rgba(254, 78, 14, 0) 60%),
    radial-gradient(720px 260px at 84% 20%, rgba(34, 197, 94, .10), rgba(34, 197, 94, 0) 62%),
    rgba(255, 255, 255, .03);
}

.peopleStockCard .dashScroll {
  padding-right: 6px;
}

.peopleStockCard .dashSectionDivider {
  margin: 12px 0;
}

/* fixed-height cards with internal scroll (cuts the "too long" feel) */
.dashFixed {
  min-height: 0;
}

.dashScroll {
  max-height: 330px;
  overflow: auto;
  padding-right: 4px;
}

@media (max-width: 650px) {
  .dashScroll {
    max-height: 340px;
  }
}

/* performance stats row */
.dashMiniRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.miniPill {
  flex: 1 1 140px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .10);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.miniPill span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 900;
}

.miniPill b {
  font-size: 13px;
  font-weight: 980;
  color: rgba(255, 255, 255, .92);
}

.tabPane.hidden {
  display: none;
}

.tabFoot {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.dashSectionHead {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dashSectionDivider {
  height: 1px;
  background: rgba(255, 255, 255, .08);
  margin: 10px 0;
}

html[data-theme="light"] .dashSectionHead {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] .dashSectionDivider {
  background: rgba(11, 18, 32, .10);
}


/* KPI compact (v103) */
.cleanLux .kpiBottom {
  gap: 6px;
}

.cleanLux .kpiStat {
  padding: 8px 9px;
  font-size: 12px;
}

.commandDash {
  gap: 18px;
}

.dashGuardBanner {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.dashGuardBanner.is-warning {
  border-color: rgba(240, 160, 30, .35);
  background: rgba(240, 160, 30, .08);
}

.dashGuardBanner.is-blocking {
  border-color: rgba(255, 59, 48, .45);
  background: rgba(255, 59, 48, .10);
}

.dashGuardBody {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dashGuardTitle {
  font-weight: 950;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, .95);
}

.dashGuardText {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
  max-width: 760px;
}

.dashGuardActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.commandDash .dashHero,
.dashCommandHero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  justify-content: initial;
  padding: 18px;
  border-radius: 22px;
  gap: 20px;
  background:
    radial-gradient(960px 420px at 14% 14%, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0) 62%),
    radial-gradient(900px 420px at 84% 16%, rgba(77, 124, 254, .12), rgba(77, 124, 254, 0) 60%),
    radial-gradient(820px 360px at 54% 100%, rgba(231, 213, 183, .10), rgba(231, 213, 183, 0) 64%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashHeroTopRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.dashCommandHero>* {
  min-width: 0;
}

.dashHeroTopRow>* {
  min-width: 0;
}

.dashCommandHero .dashHeroRight {
  min-width: 220px;
}

.dashCommandPills {
  margin-top: 12px;
  justify-content: flex-start;
}

.dashQuickLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
  text-align: right;
}

.dashQuickActions {
  margin-top: 8px;
}

.dashMetricGroup {
  display: grid;
  gap: 12px;
}

.dashMetricGroupSummary {
  margin-top: 2px;
}

.dashMetricGroupAlerts {
  gap: 14px;
}

.dashMetricGroupHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.dashMetricGroupHead>* {
  min-width: 0;
}

.dashMetricGroupEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .54);
}

.dashMetricGroupText {
  max-width: 760px;
  color: rgba(255, 255, 255, .66);
  line-height: 1.5;
}

.dashExecutiveGrid {
  display: grid;
  grid-template-columns: 1.45fr .85fr .85fr;
  gap: 14px;
}

.dashPulseCard,
.dashExecutiveCard,
.dashSupportCard,
.dashAttentionCard,
.dashPerfStatCard,
.dashPriorityIntro {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 22px 44px rgba(4, 8, 20, .18);
}

.dashPulseCard::before,
.dashExecutiveCard::before,
.dashSupportCard::before,
.dashAttentionCard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 74px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: rgba(255, 255, 255, .16);
  opacity: .9;
}

.dashPulseCard {
  padding: 20px;
  display: grid;
  gap: 14px;
  min-height: 252px;
  background:
    radial-gradient(circle at top right, rgba(77, 124, 254, .12), transparent 36%),
    radial-gradient(circle at bottom left, rgba(254, 78, 14, .10), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .16));
  border-color: rgba(120, 147, 203, .18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 28px 56px rgba(8, 12, 28, .26);
}

.dashPulseCard::before {
  background: linear-gradient(90deg, rgba(255, 214, 191, .95), rgba(254, 78, 14, .95));
}

.dashPulseTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashPulseLabel,
.dashExecutiveLabel,
.dashSupportLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .54);
}

.dashPulseState {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
}

.dashPulseBadge,
.dashAttentionBadge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashPulseValue {
  font-size: clamp(42px, 5vw, 58px);
  line-height: .95;
  font-weight: 1000;
  letter-spacing: -.05em;
  color: rgba(255, 255, 255, .97);
}

.dashPulseMeta,
.dashPulseNarrative,
.dashExecutiveMeta,
.dashSupportMeta,
.dashAttentionMeta,
.dashPriorityText,
.dashInsightsText {
  color: rgba(255, 255, 255, .68);
  line-height: 1.55;
}

.dashPulseNarrative {
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

.dashPulseStats,
.dashExecutiveStats,
.dashSupportStats,
.dashPerfStatsGrid {
  display: grid;
  gap: 10px;
}

.dashPulseStats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashExecutiveStats {
  grid-template-columns: 1fr;
  margin-top: auto;
}

.dashPulseStat,
.dashExecutiveStat,
.dashSupportStat {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .12);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashPulseStat span,
.dashExecutiveStat span,
.dashSupportStat span,
.dashPerfStatCard span {
  font-size: 11px;
  color: rgba(255, 255, 255, .58);
  font-weight: 900;
  line-height: 1.2;
}

.dashPulseStat b,
.dashExecutiveStat b,
.dashSupportStat b,
.dashPerfStatCard b {
  font-size: 14px;
  font-weight: 980;
  color: rgba(255, 255, 255, .94);
  white-space: nowrap;
}

.dashExecutiveCard {
  padding: 18px;
  display: grid;
  gap: 12px;
  min-height: 238px;
}

.dashExecutiveCard[data-tone="cash"] {
  border-color: rgba(82, 132, 255, .18);
  background:
    radial-gradient(circle at top right, rgba(77, 124, 254, .18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(56, 189, 248, .10), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashExecutiveCard[data-tone="cash"]::before {
  background: linear-gradient(90deg, rgba(147, 197, 253, .96), rgba(77, 124, 254, .96));
}

.dashExecutiveCard[data-tone="risk"] {
  border-color: rgba(255, 168, 77, .22);
  background:
    radial-gradient(circle at top right, rgba(255, 159, 10, .18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(255, 84, 89, .08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashExecutiveCard[data-tone="risk"]::before {
  background: linear-gradient(90deg, rgba(255, 214, 102, .96), rgba(255, 120, 64, .96));
}

.dashExecutiveValue {
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .96);
}

.dashSupportGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashSupportCard {
  padding: 16px;
  display: grid;
  gap: 9px;
  min-height: 184px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 16px 34px rgba(3, 7, 18, .14);
}

.dashSupportValue {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 1000;
  color: rgba(255, 255, 255, .96);
}

.dashSupportStats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashSupportCard[data-tone="week"],
.dashSupportCard[data-tone="month"] {
  border-color: rgba(97, 136, 214, .16);
  background:
    radial-gradient(circle at top right, rgba(77, 124, 254, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .13));
}

.dashSupportCard[data-tone="week"]::before,
.dashSupportCard[data-tone="month"]::before {
  background: linear-gradient(90deg, rgba(147, 197, 253, .95), rgba(77, 124, 254, .95));
}

.dashSupportCard[data-tone="risk"] {
  border-color: rgba(255, 163, 76, .18);
  background:
    radial-gradient(circle at top right, rgba(255, 159, 10, .12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .13));
}

.dashSupportCard[data-tone="risk"]::before {
  background: linear-gradient(90deg, rgba(255, 214, 102, .94), rgba(255, 138, 76, .94));
}

.dashSupportCard[data-tone="stock"] {
  border-color: rgba(52, 199, 89, .18);
  background:
    radial-gradient(circle at top right, rgba(52, 199, 89, .14), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .13));
}

.dashSupportCard[data-tone="stock"]::before {
  background: linear-gradient(90deg, rgba(134, 239, 172, .96), rgba(52, 199, 89, .96));
}

.dashAttentionStrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashAttentionCard {
  padding: 14px 15px;
  display: grid;
  gap: 9px;
  min-height: 160px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 30px rgba(3, 7, 18, .12);
}

.dashAttentionTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashAttentionLabel,
.dashInsightsKicker,
.dashPriorityKicker,
.dashPerfEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .52);
}

.dashAttentionValue {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -.04em;
  color: rgba(255, 255, 255, .96);
}

.dashAttentionCard[data-tone="danger"] {
  border-color: rgba(255, 69, 58, .20);
  background:
    radial-gradient(circle at top right, rgba(255, 69, 58, .14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashAttentionCard[data-tone="danger"]::before {
  background: linear-gradient(90deg, rgba(255, 177, 177, .95), rgba(255, 99, 132, .95));
}

.dashAttentionCard[data-tone="warn"] {
  border-color: rgba(255, 159, 10, .18);
  background:
    radial-gradient(circle at top right, rgba(255, 159, 10, .14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashAttentionCard[data-tone="warn"]::before {
  background: linear-gradient(90deg, rgba(255, 226, 153, .95), rgba(255, 159, 10, .95));
}

.dashAttentionCard[data-tone="info"] {
  border-color: rgba(77, 124, 254, .18);
  background:
    radial-gradient(circle at top right, rgba(77, 124, 254, .14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashAttentionCard[data-tone="info"]::before {
  background: linear-gradient(90deg, rgba(147, 197, 253, .95), rgba(77, 124, 254, .95));
}

.dashAttentionCard[data-tone="calm"] {
  border-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at top right, rgba(148, 163, 184, .08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
}

.dashAttentionCard[data-tone="calm"]::before {
  background: linear-gradient(90deg, rgba(148, 163, 184, .90), rgba(107, 114, 128, .90));
}

.dashAttentionOpen {
  justify-self: flex-start;
  margin-top: 4px;
  min-height: 36px;
  padding-inline: 14px;
}

.commandGrid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.dashPerfCommand {
  padding: 16px;
}

.dashPerfStatsGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 6px;
}

.dashPerfStatCard {
  padding: 11px 12px;
  background: rgba(0, 0, 0, .10);
}

.dashInsightsIntro {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.dashInsightsText {
  max-width: 720px;
}

.dashInsightsRow {
  display: grid;
  grid-template-columns: 1.2fr .95fr;
  gap: 12px;
}

.dashPriorityRail {
  gap: 14px;
}

.dashPriorityIntro {
  padding: 14px 15px;
  display: grid;
  gap: 6px;
}

.dashRailCard {
  border-color: rgba(255, 255, 255, .10);
}

.dashListWrap {
  margin-top: 12px;
}

html[data-theme="light"] .dashGuardBanner {
  border-color: rgba(17, 24, 39, .10);
}

html[data-theme="light"] .dashGuardBanner.is-warning {
  border-color: rgba(217, 119, 6, .22);
  background: rgba(251, 191, 36, .12);
}

html[data-theme="light"] .dashGuardBanner.is-blocking {
  border-color: rgba(220, 38, 38, .22);
  background: rgba(254, 226, 226, .90);
}

html[data-theme="light"] .dashGuardTitle,
html[data-theme="light"] .dashPulseState,
html[data-theme="light"] .dashPulseValue,
html[data-theme="light"] .dashExecutiveValue,
html[data-theme="light"] .dashSupportValue,
html[data-theme="light"] .dashAttentionValue,
html[data-theme="light"] .dashPerfStatCard b {
  color: rgba(15, 23, 42, .92);
}

html[data-theme="light"] .dashGuardText,
html[data-theme="light"] .dashPulseMeta,
html[data-theme="light"] .dashPulseNarrative,
html[data-theme="light"] .dashExecutiveMeta,
html[data-theme="light"] .dashSupportMeta,
html[data-theme="light"] .dashAttentionMeta,
html[data-theme="light"] .dashPriorityText,
html[data-theme="light"] .dashInsightsText {
  color: rgba(15, 23, 42, .62);
}

html[data-theme="light"] .dashQuickLabel,
html[data-theme="light"] .dashPulseLabel,
html[data-theme="light"] .dashExecutiveLabel,
html[data-theme="light"] .dashSupportLabel,
html[data-theme="light"] .dashAttentionLabel,
html[data-theme="light"] .dashPerfEyebrow,
html[data-theme="light"] .dashInsightsKicker,
html[data-theme="light"] .dashPriorityKicker,
html[data-theme="light"] .dashPulseStat span,
html[data-theme="light"] .dashExecutiveStat span,
html[data-theme="light"] .dashSupportStat span,
html[data-theme="light"] .dashPerfStatCard span {
  color: rgba(15, 23, 42, .58);
}

html[data-theme="light"] .dashPulseStat b,
html[data-theme="light"] .dashExecutiveStat b,
html[data-theme="light"] .dashSupportStat b,
html[data-theme="light"] .miniPill b {
  color: rgba(15, 23, 42, .92);
}

html[data-theme="light"] .miniPill {
  border-color: rgba(17, 24, 39, .08);
  background: rgba(245, 247, 251, .94);
}

html[data-theme="light"] .miniPill span {
  color: rgba(15, 23, 42, .58);
}

html[data-theme="light"] .dashMetricGroupEyebrow {
  color: rgba(15, 23, 42, .58);
}

html[data-theme="light"] .dashMetricGroupText {
  color: rgba(15, 23, 42, .62);
}

html[data-theme="light"] .dashPulseCard,
html[data-theme="light"] .dashExecutiveCard,
html[data-theme="light"] .dashSupportCard,
html[data-theme="light"] .dashAttentionCard,
html[data-theme="light"] .dashPerfStatCard,
html[data-theme="light"] .dashPriorityIntro {
  border-color: rgba(17, 24, 39, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 251, .98));
}

html[data-theme="light"] .dashPulseStat,
html[data-theme="light"] .dashExecutiveStat,
html[data-theme="light"] .dashSupportStat {
  border-color: rgba(17, 24, 39, .08);
  background: rgba(245, 247, 251, .92);
}

@media (max-width: 1180px) {
  .dashExecutiveGrid {
    grid-template-columns: 1fr 1fr;
  }

  .dashPulseCard {
    grid-column: 1 / -1;
  }

  .dashSupportGrid,
  .dashAttentionStrip,
  .dashPerfStatsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 1000px) {
  .commandGrid {
    grid-template-columns: 1fr;
  }

  .dashInsightsRow {
    grid-template-columns: 1fr;
  }

  .dashPriorityRail {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .dashHeroTopRow {
    grid-template-columns: 1fr;
  }

  .dashHeroRight {
    align-items: flex-start;
    min-width: 0;
  }

  .dashQuickLabel {
    text-align: left;
  }

  .dashMetricGroupHead {
    padding: 0;
  }

  .dashExecutiveGrid,
  .dashSupportGrid,
  .dashAttentionStrip,
  .dashPerfStatsGrid,
  .dashPulseStats,
  .dashSupportStats {
    grid-template-columns: 1fr;
  }

  .dashCommandPills,
  .dashQuickActions {
    justify-content: flex-start;
  }
}


/* =========================================================
   Mobile App Mode (v107) — iPhone + Android ready
   - Off-canvas drawer
   - Fixed top app bar + bottom tab bar
   - Safe-area paddings (notch/home indicator)
   ========================================================= */
:root {
  --topbarH: 56px;
  --bottombarH: 66px;
}

html {
  -webkit-text-size-adjust: 100%;
}

.drawerBackdrop {
  display: none;
}

.topbar {
  display: none;
}

.mobileNav {
  display: none;
}

/* Mobile list cards (orders) — hidden on desktop */
.ordersCards {
  display: none;
  margin-top: 10px;
}

.oCard {
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .16);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .30);
}

.oTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.oName {
  font-weight: 980;
  font-size: 14px;
}

.oMeta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.oProduct {
  margin-top: 10px;
  font-weight: 900;
  font-size: 13px;
}

.oSub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.oMoney {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.oMoney .mBox {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .10);
  border-radius: 14px;
  padding: 9px 10px;
}

.oMoney .mBox span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
}

.oMoney .mBox b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 980;
}

.oActions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.oActions::-webkit-scrollbar {
  display: none;
}

.btn.sm {
  padding: 9px 10px;
  border-radius: 14px;
  font-size: 12px;
}

.oEmpty {
  border: 1px dashed rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .10);
  border-radius: 18px;
  padding: 16px;
  color: rgba(255, 255, 255, .78);
}

.oEmpty b {
  display: block;
  font-size: 14px;
  font-weight: 980;
  margin-bottom: 6px;
}

.oEmpty p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

/* Orders dashboard refinement */
#view-orders {
  gap: 12px;
}

#view-orders .ordersHero {
  padding: 16px 18px;
}

.orderHeroMeta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orderHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
}

.orderHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.orderHeroPillMuted {
  color: rgba(255, 255, 255, .62);
}

#view-orders .ordersHeroRight {
  max-width: none;
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.ordersHeroField {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ordersHeroField label {
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
}

.ordersRouteControls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ordersRouteControls .select,
.ordersHeroField .search {
  width: 100%;
  min-width: 0;
}

.ordersOverviewGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.orderKpiCard {
  padding: 14px 16px;
  border-radius: 20px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 14%, rgba(254, 78, 14, .08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 32px rgba(0, 0, 0, .16);
}

.orderKpiCard[data-tone="overdue"] {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 96, 96, .10), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}

.orderKpiCard[data-tone="revenue"] {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 184, 107, .12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}

.orderKpiTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.orderKpiLabel {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.orderKpiValue {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 980;
  color: rgba(255, 255, 255, .96);
  line-height: 1.05;
}

.orderKpiMetaTag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.orderKpiCard[data-tone="active"] .orderKpiMetaTag {
  border-color: rgba(254, 78, 14, .95);
  background: rgba(254, 78, 14, .95);
  color: #ffffff;
}

.orderKpiCard[data-tone="unpaid"] .orderKpiMetaTag {
  border-color: rgba(255, 194, 49, .95);
  background: rgba(255, 194, 49, .95);
  color: rgba(0, 0, 0, .88);
}

.orderKpiCard[data-tone="overdue"] .orderKpiMetaTag {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
}

.orderKpiCard[data-tone="revenue"] .orderKpiMetaTag {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

.orderKpiHint {
  color: var(--muted);
  font-size: 12.5px;
}

.ordersToolbarPanel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ordersSegmented {
  gap: 8px;
}

.ordersSegmented .chip {
  padding: 9px 13px;
}

.orderResultsMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.orderResultsMeta b {
  color: rgba(255, 255, 255, .94);
}

.orderResultsFlag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(254, 78, 14, .18);
  background: rgba(254, 78, 14, .10);
  color: rgba(255, 244, 232, .90);
  font-weight: 900;
}

#view-orders .installmentControlCenter {
  margin-top: 0;
  padding: 16px;
  border-radius: 20px;
}

.installmentCenterHead {
  align-items: flex-start;
  gap: 14px;
}

.installmentCenterTopActions {
  margin-left: auto;
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 0;
}

.installmentCenterMeta {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 850;
}

.installmentCenterToolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.installmentCenterToolbar input[type="month"] {
  min-width: 170px;
}

.installmentCenterBody {
  display: grid;
  gap: 12px;
}

#view-orders .installmentControlCenter.isEmpty {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 184, 107, .08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .018));
}

.installmentControlCenter.isCollapsed .installmentCenterBody {
  display: none;
}

.ordersTableWrap {
  margin-top: 0;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)),
    rgba(10, 14, 22, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 18px 34px rgba(0, 0, 0, .18);
}

.ordersDesktopTable {
  min-width: 0;
}

#view-orders #ordersTable {
  min-width: 1180px;
}

#view-orders #ordersTable th {
  background: rgba(16, 22, 34, .92);
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  padding: 13px 14px;
}

#view-orders #ordersTable td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  vertical-align: top;
}

#view-orders #ordersTable tr:hover td {
  background: rgba(255, 255, 255, .028);
}

.orderIdCell,
.orderCustomerCell,
.orderProductCell,
.orderLocationCell,
.orderMoneyCell,
.orderStateCell,
.orderDueCell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.orderIdPrimary,
.orderCustomerName,
.orderProductTitle,
.orderLocationMain,
.orderMoneyPrimary,
.orderDueMain {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
  line-height: 1.2;
}

.orderCustomerName {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orderIdPrimary {
  font-size: 13px;
}

.orderIdSecondary,
.orderIdMeta,
.orderCustomerPhone,
.orderProductMeta,
.orderLocationMeta,
.orderStateHint,
.orderDueHint,
.orderDueMeta {
  color: var(--muted);
  font-size: 12px;
}

.orderProductMeta,
.orderLocationMeta,
.orderDueMeta {
  line-height: 1.4;
}

.orderLocationMain {
  font-size: 13px;
}

.orderLocationMeta {
  letter-spacing: .03em;
}

.orderMoneyPrimary {
  font-size: 18px;
}

.orderMoneyMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.orderMoneyMeta span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}

.orderMoneyMeta b {
  color: rgba(255, 255, 255, .90);
  font-weight: 900;
}

.orderMoneyMeta b.isOutstanding {
  color: #ffe0cf;
}

.orderStatePill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 900;
}

.orderStatePill.tone-neutral {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .95);
  color: rgba(15, 20, 30, .92);
}

.orderStatePill.tone-accent {
  border-color: rgba(254, 78, 14, .95);
  background: rgba(254, 78, 14, .95);
  color: #ffffff;
}

.orderStatePill.tone-warn {
  border-color: rgba(255, 194, 49, .95);
  background: rgba(255, 194, 49, .95);
  color: rgba(0, 0, 0, .88);
}

.orderStatePill.tone-good {
  border-color: rgba(67, 210, 123, .95);
  background: rgba(67, 210, 123, .95);
  color: #ffffff;
}

.orderStatePill.tone-danger {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
}

.orderDueTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.orderAlertPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}

.orderActionDock {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.orderActionDock .btn {
  white-space: nowrap;
}

.orderActionMenu {
  position: relative;
}

.orderActionMenu[open] {
  z-index: 8;
}

.orderActionMenu summary {
  list-style: none;
}

.orderActionMenu summary::-webkit-details-marker {
  display: none;
}

.orderMenuTrigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.orderMenuTrigger:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.orderMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(210px, 85vw);
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(16, 22, 34, .96);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .30);
}

.orderMenuItem {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}

.orderMenuItem:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.orderMenuItem.danger {
  border-color: rgba(255, 99, 99, .26);
  background: rgba(255, 99, 99, .10);
  color: #ffd7d7;
}

.ordersEmptyRow {
  display: grid;
  gap: 6px;
  padding: 18px 6px;
  text-align: center;
}

.ordersEmptyRow b {
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
}

.ordersEmptyRow span {
  color: var(--muted);
  font-size: 12.5px;
}

.ordersCards {
  padding: 0;
  gap: 12px;
}

.orderCard {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14)),
    rgba(10, 14, 22, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .18);
}

.orderCardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.orderCardIdentity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.orderCardId,
.orderCardPhone,
.orderCardMeta,
.orderCardLocation,
.orderCardStateBlock span,
.orderCardStateBlock small {
  color: var(--muted);
  font-size: 12px;
}

.orderCardName,
.orderCardProduct {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.orderCardName {
  font-size: 15px;
}

.orderCardProduct {
  font-size: 14px;
}

.orderCardActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.orderCardStateGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.orderCardStateBlock {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.orderCardDue {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .025);
}

.orderCardMoneyGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.orderCardMoneyItem {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.orderCardMoneyItem span {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

.orderCardMoneyItem b {
  color: rgba(255, 255, 255, .94);
  font-size: 14px;
  font-weight: 950;
}

.orderCardMoneyItem b.isOutstanding {
  color: #ffe0cf;
}

html[data-theme="light"] #view-orders .orderKpiCard,
html[data-theme="light"] #view-orders .ordersToolbarPanel,
html[data-theme="light"] #view-orders .ordersTableWrap,
html[data-theme="light"] #view-orders .orderCard,
html[data-theme="light"] #view-orders .installmentControlCenter,
html[data-theme="light"] #view-orders .orderCardStateBlock,
html[data-theme="light"] #view-orders .orderCardDue,
html[data-theme="light"] #view-orders .orderCardMoneyItem {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
}

html[data-theme="light"] #view-orders .orderHeroPill,
html[data-theme="light"] #view-orders .installmentCenterMeta {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-orders .orderHeroPill b,
html[data-theme="light"] #view-orders .orderKpiValue,
html[data-theme="light"] #view-orders .orderIdPrimary,
html[data-theme="light"] #view-orders .orderCustomerName,
html[data-theme="light"] #view-orders .orderProductTitle,
html[data-theme="light"] #view-orders .orderLocationMain,
html[data-theme="light"] #view-orders .orderMoneyPrimary,
html[data-theme="light"] #view-orders .orderDueMain,
html[data-theme="light"] #view-orders .orderCardName,
html[data-theme="light"] #view-orders .orderCardProduct,
html[data-theme="light"] #view-orders .orderCardMoneyItem b,
html[data-theme="light"] #view-orders .ordersEmptyRow b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-orders .orderHeroPillMuted,
html[data-theme="light"] #view-orders .ordersHeroField label,
html[data-theme="light"] #view-orders .orderKpiLabel,
html[data-theme="light"] #view-orders .orderKpiHint,
html[data-theme="light"] #view-orders .orderResultsMeta,
html[data-theme="light"] #view-orders .orderIdSecondary,
html[data-theme="light"] #view-orders .orderIdMeta,
html[data-theme="light"] #view-orders .orderCustomerPhone,
html[data-theme="light"] #view-orders .orderProductMeta,
html[data-theme="light"] #view-orders .orderLocationMeta,
html[data-theme="light"] #view-orders .orderStateHint,
html[data-theme="light"] #view-orders .orderDueHint,
html[data-theme="light"] #view-orders .orderDueMeta,
html[data-theme="light"] #view-orders .orderCardId,
html[data-theme="light"] #view-orders .orderCardPhone,
html[data-theme="light"] #view-orders .orderCardMeta,
html[data-theme="light"] #view-orders .orderCardLocation,
html[data-theme="light"] #view-orders .orderCardStateBlock span,
html[data-theme="light"] #view-orders .orderCardStateBlock small,
html[data-theme="light"] #view-orders .ordersEmptyRow span {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] #view-orders #ordersTable th {
  background: rgba(245, 247, 251, .98);
  color: rgba(11, 18, 32, .68);
}

html[data-theme="light"] #view-orders #ordersTable td {
  border-bottom: 1px solid rgba(11, 18, 32, .08);
}

html[data-theme="light"] #view-orders #ordersTable tr:hover td {
  background: rgba(11, 18, 32, .03);
}

html[data-theme="light"] #view-orders .orderMenuTrigger,
html[data-theme="light"] #view-orders .orderMenuPanel,
html[data-theme="light"] #view-orders .orderMenuItem {
  border-color: rgba(11, 18, 32, .10);
}

html[data-theme="light"] #view-orders .orderMenuTrigger,
html[data-theme="light"] #view-orders .orderMenuItem {
  background: rgba(255, 255, 255, .95);
  color: rgba(11, 18, 32, .88);
}

html[data-theme="light"] #view-orders .orderMenuPanel {
  background: rgba(255, 255, 255, .98);
}

/* Payments ledger refinement */
#view-payments {
  gap: 12px;
}

#view-payments .paymentsHero {
  padding: 16px 18px;
}

.paymentHeroMeta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paymentHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
}

.paymentHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.paymentHeroPillMuted {
  color: rgba(255, 255, 255, .62);
}

#view-payments .paymentsHeroRight {
  max-width: none;
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.paymentsOverviewGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.paymentKpiCard {
  padding: 14px 16px;
  border-radius: 20px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 12% 14%, rgba(254, 78, 14, .08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 32px rgba(0, 0, 0, .16);
}

.paymentKpiCard[data-tone="week"] {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 184, 107, .10), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}

.paymentKpiCard[data-tone="month"] {
  background:
    radial-gradient(circle at 12% 14%, rgba(77, 124, 254, .11), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
}

.paymentKpiCard[data-tone="cash"] {
  background:
    radial-gradient(circle at 12% 14%, rgba(254, 78, 14, .12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}

.paymentKpiTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.paymentKpiLabel {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.paymentKpiValue {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 980;
  color: rgba(255, 255, 255, .96);
  line-height: 1.05;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.paymentKpiMetaTag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.paymentKpiHint {
  color: var(--muted);
  font-size: 12.5px;
}

.paymentsToolbarPanel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.paymentsSegmented {
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.paymentsSegmented::-webkit-scrollbar {
  display: none;
}

.paymentsSegmented .chip {
  padding: 9px 13px;
  white-space: nowrap;
}

.paymentResultsMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.paymentResultsMeta b {
  color: rgba(255, 255, 255, .94);
}

.paymentResultsFlag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(254, 78, 14, .18);
  background: rgba(254, 78, 14, .10);
  color: rgba(255, 244, 232, .90);
  font-weight: 900;
}

.paymentsTableWrap {
  margin-top: 0;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)),
    rgba(10, 14, 22, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 18px 34px rgba(0, 0, 0, .18);
}

.paymentsDesktopTable {
  min-width: 0;
}

#view-payments #paymentsTable {
  min-width: 1040px;
}

#view-payments #paymentsTable th {
  background: rgba(16, 22, 34, .92);
  color: rgba(255, 255, 255, .66);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  padding: 13px 14px;
}

#view-payments #paymentsTable td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  vertical-align: middle;
}

#view-payments #paymentsTable tr:hover td {
  background: rgba(255, 255, 255, .028);
}

#view-payments #paymentsTable .paymentsColId {
  width: 96px;
}

.paymentDateCell,
.paymentIdCell,
.paymentCustomerCell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.paymentDateMain {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .90);
  font-weight: 900;
}

.paymentDateMeta,
.paymentCustomerMeta,
.paymentLinkEmpty {
  color: var(--muted);
  font-size: 12px;
}

.paymentCustomerMeta {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paymentIdText {
  color: rgba(255, 255, 255, .56);
  font-size: 12.5px;
  letter-spacing: .06em;
}

.paymentCustomerName {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
  font-size: 14px;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paymentAmount {
  color: rgba(255, 255, 255, .98);
  font-size: 22px;
  font-weight: 980;
  line-height: 1.05;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.paymentMethodPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 900;
}

.paymentMethodPill[data-tone="cash"] {
  border-color: rgba(254, 78, 14, .22);
  background: rgba(254, 78, 14, .10);
  color: #ffe6d5;
}

.paymentMethodPill[data-tone="bank"] {
  border-color: rgba(77, 124, 254, .22);
  background: rgba(77, 124, 254, .10);
  color: #e4ecff;
}

.paymentMethodPill[data-tone="other"] {
  color: rgba(255, 255, 255, .78);
}

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

.paymentLinkPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.paymentLinkPill b {
  color: rgba(255, 255, 255, .94);
}

.paymentLinkPill[data-tone="order"] {
  border-color: rgba(254, 78, 14, .16);
  background: rgba(254, 78, 14, .08);
}

.paymentLinkPill[data-tone="debt"] {
  border-color: rgba(77, 124, 254, .16);
  background: rgba(77, 124, 254, .08);
}

.paymentLockTag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 194, 49, .22);
  background: rgba(255, 194, 49, .10);
  color: #fff0c6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.paymentActionDock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.paymentActionDock .btn {
  white-space: nowrap;
}

.paymentActionMenu {
  position: relative;
}

.paymentActionMenu[open] {
  z-index: 8;
}

.paymentActionMenu summary {
  list-style: none;
}

.paymentActionMenu summary::-webkit-details-marker {
  display: none;
}

.paymentMenuTrigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.paymentMenuTrigger:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.paymentMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(190px, 82vw);
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(16, 22, 34, .96);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .30);
}

.paymentMenuItem {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}

.paymentMenuItem:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.paymentMenuItem:disabled {
  opacity: .54;
  cursor: not-allowed;
}

.paymentMenuItem.danger {
  border-color: rgba(255, 99, 99, .26);
  background: rgba(255, 99, 99, .10);
  color: #ffd7d7;
}

.paymentsEmptyRow {
  display: grid;
  gap: 8px;
  padding: 18px 8px;
  text-align: center;
}

.paymentsEmptyRow b {
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
}

.paymentsEmptyRow span {
  color: var(--muted);
  font-size: 12.5px;
}

.paymentsEmptyActions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.paymentsCards {
  display: none;
  padding: 0;
  gap: 12px;
}

.paymentCard {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14)),
    rgba(10, 14, 22, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .18);
}

.paymentCardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.paymentCardIdentity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.paymentCardDate {
  color: rgba(255, 255, 255, .60);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.paymentCardMeta,
.paymentCardSub {
  color: var(--muted);
  font-size: 12px;
}

.paymentCardSub {
  line-height: 1.4;
}

.paymentCardAmount {
  color: rgba(255, 255, 255, .98);
  font-size: 24px;
  font-weight: 980;
  line-height: 1.05;
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.paymentCardClient {
  color: rgba(255, 255, 255, .95);
  font-size: 15px;
  font-weight: 950;
}

.paymentCardDetailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paymentCardDetail {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.paymentCardDetail>span {
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 900;
}

.paymentCardFlag {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 194, 49, .18);
  background: rgba(255, 194, 49, .10);
  color: #fff0c6;
  font-size: 12px;
  font-weight: 850;
}

.paymentCardActions {
  display: flex;
  justify-content: flex-end;
}

.paymentCardEmpty {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] #view-payments .paymentKpiCard,
html[data-theme="light"] #view-payments .paymentsToolbarPanel,
html[data-theme="light"] #view-payments .paymentsTableWrap,
html[data-theme="light"] #view-payments .paymentCard,
html[data-theme="light"] #view-payments .paymentCardDetail {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
}

html[data-theme="light"] #view-payments .paymentHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-payments .paymentHeroPill b,
html[data-theme="light"] #view-payments .paymentKpiValue,
html[data-theme="light"] #view-payments .paymentDateMain,
html[data-theme="light"] #view-payments .paymentCustomerName,
html[data-theme="light"] #view-payments .paymentAmount,
html[data-theme="light"] #view-payments .paymentCardAmount,
html[data-theme="light"] #view-payments .paymentCardClient,
html[data-theme="light"] #view-payments .paymentLinkPill b,
html[data-theme="light"] #view-payments .paymentsEmptyRow b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-payments .paymentHeroPillMuted,
html[data-theme="light"] #view-payments .paymentKpiLabel,
html[data-theme="light"] #view-payments .paymentKpiHint,
html[data-theme="light"] #view-payments .paymentResultsMeta,
html[data-theme="light"] #view-payments .paymentDateMeta,
html[data-theme="light"] #view-payments .paymentCustomerMeta,
html[data-theme="light"] #view-payments .paymentIdText,
html[data-theme="light"] #view-payments .paymentLinkEmpty,
html[data-theme="light"] #view-payments .paymentCardMeta,
html[data-theme="light"] #view-payments .paymentCardSub,
html[data-theme="light"] #view-payments .paymentsEmptyRow span {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] #view-payments #paymentsTable th {
  background: rgba(245, 247, 251, .98);
  color: rgba(11, 18, 32, .68);
}

html[data-theme="light"] #view-payments #paymentsTable td {
  border-bottom: 1px solid rgba(11, 18, 32, .08);
}

html[data-theme="light"] #view-payments #paymentsTable tr:hover td {
  background: rgba(11, 18, 32, .03);
}

html[data-theme="light"] #view-payments .paymentMenuTrigger,
html[data-theme="light"] #view-payments .paymentMenuPanel,
html[data-theme="light"] #view-payments .paymentMenuItem {
  border-color: rgba(11, 18, 32, .10);
}

html[data-theme="light"] #view-payments .paymentMenuTrigger,
html[data-theme="light"] #view-payments .paymentMenuItem {
  background: rgba(255, 255, 255, .95);
  color: rgba(11, 18, 32, .88);
}

html[data-theme="light"] #view-payments .paymentMenuPanel {
  background: rgba(255, 255, 255, .98);
}

@media (max-width: 1180px) {
  #view-payments .paymentsHeroRight {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #view-payments .paymentsHeroRight .btn.primary {
    grid-column: 1 / -1;
  }

  .paymentsOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #view-payments .paymentsHero {
    gap: 14px;
  }

  #view-payments .paymentsHeroRight {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .paymentsOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paymentsCards {
    display: grid;
  }

  .paymentsTableWrap {
    display: none;
  }

  .paymentCardDetailGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .paymentCardActions,
  .paymentActionDock {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .paymentsOverviewGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .paymentCardTop {
    align-items: flex-start;
  }

  .paymentCardAmount {
    font-size: 21px;
  }
}

@media (max-width: 980px) {

  /* Layout */
  html,
  body {
    overflow-x: hidden;
  }

  .tableWrap {
    overflow: auto;
  }

  body {
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
  }

  body.drawerOpen {
    overflow: hidden;
  }

  .shell {
    max-width: 100%;
    margin: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* Prevent wide tables from widening the page (iOS Safari classic). */
  .shell>* {
    min-width: 0
  }

  .main {
    min-width: 0
  }

  .card,
  .view {
    min-width: 0
  }

  .main {
    gap: 12px;
    padding:
      calc(var(--topbarH) + env(safe-area-inset-top) + 10px) calc(12px + env(safe-area-inset-right)) calc(var(--bottombarH) + env(safe-area-inset-bottom) + 16px + var(--vvBottom, 0px)) calc(12px + env(safe-area-inset-left));
  }

  .card {
    padding: 12px;
    border-radius: 18px;
  }

  /* Off-canvas drawer */
  .drawerBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 110;
  }

  body.drawerOpen .drawerBackdrop {
    display: block;
  }

  .side {
    position: fixed;
    top: calc(var(--topbarH) + env(safe-area-inset-top) + 8px);
    left: 0;
    bottom: auto;
    right: auto;
    width: min(360px, 88vw);
    max-width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 12px);
    height: calc((var(--vvh, 1vh) * 100) - var(--topbarH) - env(safe-area-inset-top) - 10px);
    max-height: calc((var(--vvh, 1vh) * 100) - var(--topbarH) - env(safe-area-inset-top) - 10px);
    transform: translateX(-110%);
    transition: transform 180ms ease;
    z-index: 120;
    border-radius: 0 22px 22px 0;
    padding: 14px;
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  body.drawerOpen .side {
    transform: translateX(0);
  }

  /* Keep drawer content intact (override old mobile rules that turned sidebar into bottom bar) */
  .brandSub {
    display: block;
  }

  .brandEyebrow {
    display: none;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .navItem {
    justify-content: space-between;
    font-size: 14px;
    padding: 11px 12px;
  }

  .navItem .dot {
    display: inline-block;
  }

  .navItem .count {
    display: inline-flex;
  }

  .sideActions {
    display: flex;
  }

  .sideHint {
    display: block;
  }

  .sidebarUtilityZone {
    display: none !important;
  }

  /* Top app bar */
  .topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 130;
    height: calc(var(--topbarH) + env(safe-area-inset-top));
    padding:
      calc(env(safe-area-inset-top) + 10px) calc(12px + env(safe-area-inset-right)) 10px calc(12px + env(safe-area-inset-left));
    border-radius: 0;
    border-left: none;
    border-right: none;
    align-items: center;
    gap: 10px;
    background: rgba(12, 16, 26, .72);
    -webkit-backdrop-filter: blur(var(--glassBlur));
    backdrop-filter: blur(var(--glassBlur));
  }

  .topMid {
    flex: 1;
    min-width: 0;
  }

  .topTitle {
    font-weight: 950;
    font-size: 14px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topSub {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topIcon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  /* Bottom nav */
  .mobileNav {
    display: flex;
    position: fixed;
    left: calc(10px + env(safe-area-inset-left));
    right: calc(10px + env(safe-area-inset-right));
    bottom: calc(10px + var(--vvBottom, 0px));
    z-index: 125;
    height: calc(var(--bottombarH) + env(safe-area-inset-bottom));
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    border-radius: 22px;
    gap: 8px;
    align-items: center;
    background: rgba(12, 16, 26, .78);
    -webkit-backdrop-filter: blur(var(--glassBlur));
    backdrop-filter: blur(var(--glassBlur));
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.drawerOpen .mobileNav {
    opacity: 0;
    transform: translateY(140%);
    pointer-events: none;
  }

  .mnavItem {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .14);
    color: rgba(255, 255, 255, .82);
    padding: 10px 8px;
    border-radius: 16px;
    cursor: pointer;
    min-width: 0;
    touch-action: manipulation;
  }

  .mnavItem .mnavIcon svg {
    width: 20px;
    height: 20px;
  }

  .mnavItem .mnavLabel {
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mnavItem.active {
    border-color: rgba(254, 78, 14, .45);
    background: linear-gradient(135deg, rgba(254, 78, 14, .18), rgba(231, 213, 183, .08));
    color: rgba(255, 255, 255, .95);
    box-shadow: 0 16px 34px rgba(254, 78, 14, .10);
  }

  /* Hide desktop fullscreen in sidebar header on small screens (we show it in the topbar + FAB) */
  .fsNavBtn {
    display: none;
  }

  /* FAB should not cover bottom nav */
  .fsFab {
    display: grid;
    bottom: calc(var(--bottombarH) + 18px + env(safe-area-inset-bottom) + var(--vvBottom, 0px));
    right: calc(16px + env(safe-area-inset-right));
  }

  /* Make headers usable on mobile */
  .headRight {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .headRight::-webkit-scrollbar {
    display: none;
  }

  .search {
    width: 100%;
    max-width: 100%;
  }

  .toastWrap {
    top: calc(10px + env(safe-area-inset-top));
    left: calc(10px + env(safe-area-inset-left));
    right: calc(10px + env(safe-area-inset-right));
    max-width: none;
  }

  /* Orders: app-like stacked header + horizontal chip scroll */
  #view-orders .ordersHero {
    align-items: flex-start;
  }

  #view-orders .ordersHeroRight {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
  }

  #view-orders .ordersRouteControls {
    grid-template-columns: 1fr;
  }

  #view-orders .ordersOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-orders .ordersSegmented {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  #view-orders .ordersSegmented::-webkit-scrollbar {
    display: none;
  }

  #view-orders .sep {
    display: none;
  }

  /* Orders: cards on mobile, table on desktop */
  #view-orders .ordersCards {
    display: grid;
    gap: 12px;
  }

  #view-orders .ordersTableWrap {
    display: none;
  }

  /* Prevent iOS input zoom */
  input,
  select,
  textarea,
  .search {
    font-size: 16px !important;
  }

  /* Dashboard mobile layout */
  .dashKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashGrid.cleanGrid {
    grid-template-columns: 1fr;
  }

  .dashRow2 {
    grid-template-columns: 1fr;
  }

  .dashFixed {
    max-height: 280px;
  }

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

  .dashActions.compact {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .dashActions.compact::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 520px) {
  :root {
    --topbarH: 54px;
    --bottombarH: 64px;
  }

  .customerFormActionMeta,
  .debtFormActionMeta,
  .paymentFormActionMeta,
  .productEntryActionMeta {
    display: none;
  }

  .customerFormActionBar,
  .debtFormActionBar,
  .paymentFormActionBar,
  .productEntryActionBar {
    gap: 8px;
  }

  .dashKpis {
    grid-template-columns: 1fr;
  }

  .kpiV2 {
    min-height: 0;
  }

  .dashFixed {
    max-height: 260px;
  }

  #view-orders .ordersOverviewGrid {
    grid-template-columns: 1fr;
  }

  #view-orders .installmentCenterToolbar {
    width: 100%;
    justify-content: stretch;
  }

  #view-orders .installmentCenterToolbar>* {
    width: 100%;
  }

  #view-orders .orderCardTop,
  #view-orders .orderCardDue {
    flex-direction: column;
  }

  #view-orders .orderCardActions,
  #view-orders .orderActionDock {
    width: 100%;
    justify-content: flex-start;
  }

  #view-orders .orderCardStateGrid,
  #view-orders .orderCardMoneyGrid {
    grid-template-columns: 1fr;
  }
}

/* iOS Safari: when the on-screen keyboard opens, fixed bars frequently overlap inputs.
   We aggressively get out of the way. */
@media (max-width: 980px) {
  body.kbdOpen .mobileNav {
    opacity: 0;
    transform: translateY(140%);
    pointer-events: none;
  }

  body.kbdOpen .fsFab {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }

  body.kbdOpen .main {
    padding-bottom: calc(16px + env(safe-area-inset-bottom) + var(--vvBottom, 0px));
  }
}


/* CRM command center */
#view-customers .crmHero {
  align-items: flex-end;
  gap: 22px;
}

#view-customers .crmHero .headRight {
  align-items: flex-end;
}

.crmHeroTools {
  gap: 12px;
  flex-wrap: wrap;
}

.crmHeroSearch {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.crmHeroSearch label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

.crmHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.crmHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 800;
}

.crmHeroPill b {
  color: rgba(255, 255, 255, .96);
  font-weight: 950;
}

.crmOverviewGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.crmKpiCard {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(0, 0, 0, .12));
  padding: 18px 18px 16px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .18);
}

.crmKpiCard::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0));
  pointer-events: none;
}

.crmKpiEyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .54);
}

.crmKpiValue {
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
  color: rgba(255, 255, 255, .96);
}

.crmKpiMeta {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .62);
}

.crmToolbarPanel,
.crmTablePanel {
  margin-top: 16px;
}

.crmSegmented {
  margin-top: 14px;
}

.crmSegmented .chip {
  padding: 9px 13px;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.crmSegmented .chip:hover {
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .05);
}

.crmSegmented .chip.active {
  border-color: rgba(254, 78, 14, .42);
  background: rgba(254, 78, 14, .12);
}

.crmResultsMeta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
}

.crmResultsMeta b {
  color: rgba(255, 255, 255, .94);
}

.crmResultsPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.crmTableWrap {
  margin-top: 14px;
  background: rgba(9, 11, 18, .7);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 22px;
  overflow: hidden;
}

#view-customers .table th {
  padding-top: 14px;
  padding-bottom: 14px;
}

#view-customers .table td {
  padding-top: 16px;
  padding-bottom: 16px;
  vertical-align: top;
}

.crmRow td {
  border-top-color: rgba(255, 255, 255, .05);
}

.crmRow.crmRowDebt td:first-child {
  box-shadow: inset 3px 0 0 rgba(254, 78, 14, .68);
}

.crmRow.crmRowInactive td {
  background: rgba(255, 255, 255, .015);
}

.crmIdentity {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.crmAvatar {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(145deg, rgba(254, 78, 14, .26), rgba(255, 255, 255, .05));
  color: #fff;
  font-weight: 950;
  letter-spacing: .04em;
}

.crmIdentityBody {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.crmIdentityTop {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.crmName {
  font-weight: 950;
  color: rgba(255, 255, 255, .96);
}

.crmPhone {
  font-size: 13px;
  color: rgba(255, 255, 255, .74);
}

.crmNotes {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .52);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crmCityCell {
  color: rgba(255, 255, 255, .72);
}

.crmCityPrimary {
  color: rgba(255, 255, 255, .84);
  font-weight: 800;
}

.crmCitySecondary {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, .44);
}

.crmMetric {
  display: grid;
  gap: 4px;
}

.crmMetricValue {
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  color: rgba(255, 255, 255, .94);
  font-variant-numeric: tabular-nums;
}

.crmMetricSub {
  font-size: 12px;
  color: rgba(255, 255, 255, .44);
}

.crmMoneyCell {
  text-align: right;
}

.crmMoney {
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .96);
}

.crmMoney.is-neutral {
  color: rgba(255, 255, 255, .78);
}

.crmMoneySub {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, .46);
}

.crmMoneySub.is-alert {
  color: rgba(255, 183, 154, .92);
}

.crmActivity {
  display: grid;
  gap: 6px;
}

.crmActivityTop {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crmActivityValue {
  font-weight: 950;
  color: rgba(255, 255, 255, .92);
}

.crmActivityValue.is-warning {
  color: rgba(255, 220, 132, .98);
}

.crmActivityValue.is-critical {
  color: rgba(255, 163, 163, .96);
}

.crmActivityMeta {
  font-size: 12px;
  color: rgba(255, 255, 255, .5);
}

.crmStagePill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.crmStagePill.is-payment {
  border-color: rgba(15, 170, 114, .24);
  background: rgba(15, 170, 114, .13);
  color: rgba(195, 255, 230, .9);
}

.crmStagePill.is-order {
  border-color: rgba(82, 156, 255, .22);
  background: rgba(82, 156, 255, .12);
  color: rgba(214, 232, 255, .9);
}

.crmStagePill.is-debt {
  border-color: rgba(254, 78, 14, .22);
  background: rgba(254, 78, 14, .12);
  color: rgba(255, 214, 196, .92);
}

.crmStagePill.is-profile {
  color: rgba(255, 255, 255, .72);
}

.crmActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: flex-start;
}

.crmPrimaryAction {
  white-space: nowrap;
}

.crmRowMenu {
  position: relative;
}

.crmRowMenu>summary {
  list-style: none;
}

.crmRowMenu>summary::-webkit-details-marker {
  display: none;
}

.crmMenuTrigger {
  min-width: 40px;
  width: 40px;
  padding: 0;
  justify-content: center;
}

.crmMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(12, 15, 24, .98);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .38);
  display: grid;
  gap: 6px;
  z-index: 24;
}

.crmMenuItem {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .9);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 850;
  cursor: pointer;
}

.crmMenuItem:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}

.crmMenuItem.danger {
  color: rgba(255, 184, 184, .96);
  border-color: rgba(255, 86, 86, .2);
}

.crmCards {
  display: none;
  gap: 12px;
  margin-top: 14px;
}

.crmCard {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12));
  padding: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
}

.crmCard.crmRowDebt {
  box-shadow: inset 3px 0 0 rgba(254, 78, 14, .68), 0 16px 36px rgba(0, 0, 0, .18);
}

.crmCardHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.crmCardBody {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crmCardStat {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  padding: 12px;
}

.crmCardStat span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .48);
}

.crmCardStat b {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
  font-variant-numeric: tabular-nums;
}

.crmCardMeta {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.crmCardMetaLine {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.crmCardMetaLine .k {
  color: rgba(255, 255, 255, .5);
}

.crmCardMetaLine .v {
  color: rgba(255, 255, 255, .86);
  text-align: right;
}

.crmCardMetaLine .v.is-warning {
  color: rgba(255, 220, 132, .98);
}

.crmCardMetaLine .v.is-critical {
  color: rgba(255, 163, 163, .96);
}

.crmCardActions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.crmCardActions .crmPrimaryAction {
  flex: 1;
}

.crmEmptyState {
  margin-top: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14));
  padding: 28px 24px;
  text-align: center;
}

.crmEmptyInner {
  max-width: 560px;
  margin: 0 auto;
}

.crmEmptyIcon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(145deg, rgba(254, 78, 14, .22), rgba(255, 255, 255, .04));
  color: #fff;
  font-size: 26px;
  font-weight: 950;
}

.crmEmptyTitle {
  font-size: 22px;
  font-weight: 950;
  color: rgba(255, 255, 255, .96);
}

.crmEmptyText {
  margin-top: 8px;
  color: rgba(255, 255, 255, .62);
  line-height: 1.55;
}

.crmEmptyActions,
.crmEmptyQuick {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.crmEmptyActions {
  margin-top: 18px;
}

.crmQuickBtn {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .84);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
}

.crmQuickBtn:hover {
  background: rgba(255, 255, 255, .06);
}

html[data-theme="light"] #view-customers .crmHeroPill,
html[data-theme="light"] #view-customers .crmResultsPill,
html[data-theme="light"] #view-customers .crmSegmented .chip,
html[data-theme="light"] #view-customers .crmCardStat,
html[data-theme="light"] #view-customers .crmMenuItem {
  background: rgba(15, 20, 30, .03);
  border-color: rgba(15, 20, 30, .08);
  color: rgba(15, 20, 30, .72);
}

html[data-theme="light"] #view-customers .crmHeroSearch label,
html[data-theme="light"] #view-customers .crmKpiEyebrow,
html[data-theme="light"] #view-customers .crmResultsMeta,
html[data-theme="light"] #view-customers .crmCitySecondary,
html[data-theme="light"] #view-customers .crmMetricSub,
html[data-theme="light"] #view-customers .crmActivityMeta,
html[data-theme="light"] #view-customers .crmCardStat span,
html[data-theme="light"] #view-customers .crmCardMetaLine .k {
  color: rgba(15, 20, 30, .5);
}

html[data-theme="light"] #view-customers .crmHeroPill b,
html[data-theme="light"] #view-customers .crmKpiValue,
html[data-theme="light"] #view-customers .crmName,
html[data-theme="light"] #view-customers .crmMetricValue,
html[data-theme="light"] #view-customers .crmMoney,
html[data-theme="light"] #view-customers .crmActivityValue,
html[data-theme="light"] #view-customers .crmCardStat b,
html[data-theme="light"] #view-customers .crmCardMetaLine .v,
html[data-theme="light"] #view-customers .crmEmptyTitle {
  color: rgba(15, 20, 30, .92);
}

@media (max-width: 980px) {
  #view-customers .crmHero {
    align-items: stretch;
  }

  #view-customers .crmHero .headRight {
    width: 100%;
  }

  .crmHeroTools {
    width: 100%;
  }

  .crmHeroSearch {
    flex: 1 1 100%;
    min-width: 0;
  }

  .crmHeroSearch .search {
    width: 100%;
    max-width: none;
  }

  .crmOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crmSegmented {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .crmDesktopTable {
    display: none;
  }

  .crmCards {
    display: grid;
  }

  .crmTableWrap {
    background: transparent;
    border: none;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .crmOverviewGrid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .crmKpiCard {
    padding: 16px 14px 14px;
  }

  .crmKpiValue {
    font-size: 24px;
  }

  .crmCardBody {
    grid-template-columns: 1fr;
  }

  .crmCardActions,
  .crmEmptyActions {
    flex-direction: column;
  }

  .crmCardActions .btn,
  .crmEmptyActions .btn {
    width: 100%;
  }

  .crmCardActions .crmRowMenu {
    width: 100%;
  }

  .crmCardActions .crmMenuTrigger {
    width: 100%;
  }
}

/* Subscription renewal dashboard */
#view-tasks {
  gap: 10px;
}

.subsHeroHead {
  padding: 14px 18px;
}

.subsHeroHead .productHeroIntro {
  gap: 6px;
  padding-top: 14px;
}

.subsHeroHead .productHeroIntro h1 {
  font-size: clamp(28px, 3.2vw, 36px);
}

.subsHeroHead .productHeroIntro .sub {
  max-width: 760px;
  font-size: 12.5px;
  line-height: 1.45;
}

.subsHeroHead .headRight {
  max-width: none;
  width: min(860px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: end;
}

.subsHeroSearch {
  flex: 1 1 340px;
  min-width: 260px;
  display: grid;
  gap: 4px;
}

.subsHeroSearch .search {
  width: 100%;
  max-width: none;
}

.subsHeroSearch label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .68);
}

.subsHeroMeta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subsHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .76);
  font-size: 11.5px;
}

.subsHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.subsOverviewGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.subsKpiCard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(8, 12, 20, .18)),
    rgba(10, 14, 22, .86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .18);
}

.subsKpiCard::after {
  content: "";
  position: absolute;
  inset: auto -42px -70px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 123, 40, .12), rgba(254, 123, 40, 0) 72%);
  pointer-events: none;
}

.subsKpiCard[data-tone="active"]::after {
  background: radial-gradient(circle, rgba(52, 199, 89, .12), rgba(52, 199, 89, 0) 72%);
}

.subsKpiCard[data-tone="expired"]::after {
  background: radial-gradient(circle, rgba(255, 99, 99, .14), rgba(255, 99, 99, 0) 72%);
}

.subsKpiCard[data-tone="waiting"]::after {
  background: radial-gradient(circle, rgba(255, 204, 0, .14), rgba(255, 204, 0, 0) 72%);
}

.subsKpiCard[data-tone="action"]::after {
  background: radial-gradient(circle, rgba(254, 123, 40, .16), rgba(254, 123, 40, 0) 72%);
}

.subsKpiLabel {
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.subsKpiValue {
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 980;
  letter-spacing: -.04em;
}

.subsKpiHint {
  color: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 700;
}

.subsKpiMeta {
  color: rgba(255, 255, 255, .58);
  font-size: 11.5px;
  line-height: 1.35;
}

.subsQueuePanel,
.subsToolbarPanel,
.subsTablePanel {
  gap: 10px;
}

.subsQueueMeta,
.subsResultsMeta,
.subsTableMeta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  text-align: right;
}

.subsQueueMeta b,
.subsResultsMeta b,
.subsTableMeta b {
  color: #fff;
}

.subsQueueList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.subsQueueItem,
.subsCard {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .14)),
    rgba(10, 14, 22, .84);
}

.subsQueueItem[data-tone="expired"],
.subsCard[data-tone="expired"] {
  border-color: rgba(255, 99, 99, .18);
  background:
    linear-gradient(180deg, rgba(255, 99, 99, .10), rgba(0, 0, 0, .16)),
    rgba(10, 14, 22, .88);
}

.subsQueueItem[data-tone="urgent"],
.subsQueueItem[data-tone="today"],
.subsCard[data-tone="urgent"],
.subsCard[data-tone="today"] {
  border-color: rgba(254, 123, 40, .22);
  background:
    linear-gradient(180deg, rgba(254, 123, 40, .10), rgba(0, 0, 0, .16)),
    rgba(10, 14, 22, .88);
}

.subsQueueHeader,
.subsCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.subsQueueIdentity,
.subsCardIdentity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subsQueueCustomer,
.subsCardCustomer,
.subsCustomerName {
  color: rgba(255, 255, 255, .95);
  font-size: 15px;
  font-weight: 950;
}

.subsQueueProduct,
.subsCardProduct,
.subsProductTitle {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.subsQueueMetaLine,
.subsCardMeta,
.subsCustomerMeta,
.subsProductMeta,
.subsRowDateMeta,
.subsRemainingHint,
.subsFollowMeta {
  color: rgba(255, 255, 255, .58);
  font-size: 11.5px;
  line-height: 1.35;
}

.subsQueueDate {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.subsQueueDateMain,
.subsRowDateMain {
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 900;
}

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

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

.subsQueueStat,
.subsCardStat {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.subsQueueStatLabel,
.subsCardStat span {
  color: rgba(255, 255, 255, .56);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.subsQueueStatValue,
.subsCardStat b {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.subsQueueActions,
.subsCardActions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.subsQueueActions .btn,
.subsCardActions .btn {
  padding: 8px 11px;
}

.subsQueueEmpty,
.subsEmptyCard {
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .02);
  color: rgba(255, 255, 255, .66);
  font-size: 13px;
}

.subsSegmented {
  flex-wrap: wrap;
  gap: 6px;
}

.subsSegmented .chip {
  border-radius: 999px;
  padding: 8px 11px;
}

.subsToolbarPanel .productPanelNote {
  margin-top: -2px;
  font-size: 11.5px;
  line-height: 1.35;
}

.subsDesktopTable {
  margin: 0;
}

#view-tasks .subsDesktopTable .table {
  min-width: 980px;
}

#view-tasks .subsDesktopTable .table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(16, 22, 34, .94);
  color: rgba(255, 255, 255, .8);
}

#view-tasks .subsDesktopTable .table th,
#view-tasks .subsDesktopTable .table td {
  padding: 12px 12px;
}

#view-tasks .subsDesktopTable .table td {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  vertical-align: top;
}

#view-tasks .subsDesktopTable .table tr[data-tone="expired"] td {
  background: rgba(255, 99, 99, .03);
}

#view-tasks .subsDesktopTable .table tr[data-tone="urgent"] td,
#view-tasks .subsDesktopTable .table tr[data-tone="today"] td {
  background: rgba(254, 123, 40, .04);
}

#view-tasks .subsDesktopTable .table tr:hover td {
  background: rgba(255, 255, 255, .045);
}

.subsRowDate {
  display: grid;
  gap: 5px;
}

.subsCustomerCell,
.subsProductCell,
.subsRemainingCell,
.subsFollowCell {
  display: grid;
  gap: 6px;
}

.subsLifecycleBadge,
.subsFollowBadge,
.subsRemainingSignal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .8);
}

.subsLifecycleBadge.is-active,
.subsRemainingSignal.is-active {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

.subsLifecycleBadge.is-expiring,
.subsRemainingSignal.is-warning {
  border-color: rgba(255, 204, 0, .95);
  background: rgba(255, 204, 0, .95);
  color: rgba(0, 0, 0, .88);
}

.subsLifecycleBadge.is-today,
.subsRemainingSignal.is-today,
.subsRemainingSignal.is-urgent {
  border-color: rgba(254, 123, 40, .95);
  background: rgba(254, 123, 40, .95);
  color: #ffffff;
}

.subsLifecycleBadge.is-expired,
.subsRemainingSignal.is-expired {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
}

.subsFollowBadge.is-contacted {
  border-color: rgba(77, 124, 254, .95);
  background: rgba(77, 124, 254, .95);
  color: #ffffff;
}

.subsFollowBadge.is-waiting {
  border-color: rgba(255, 204, 0, .95);
  background: rgba(255, 204, 0, .95);
  color: rgba(0, 0, 0, .88);
}

.subsFollowBadge.is-confirmed {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

.subsFollowBadge.is-lost {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
}

.subsFollowBadge.is-action {
  border-color: rgba(254, 123, 40, .95);
  background: rgba(254, 123, 40, .95);
  color: #ffffff;
}

.subsActionCell {
  white-space: nowrap;
  text-align: right;
}

.subsCards {
  display: none;
  gap: 12px;
}

html[data-theme="light"] #view-tasks .subsKpiCard,
html[data-theme="light"] #view-tasks .subsQueueItem,
html[data-theme="light"] #view-tasks .subsToolbarPanel,
html[data-theme="light"] #view-tasks .subsQueuePanel,
html[data-theme="light"] #view-tasks .subsTablePanel,
html[data-theme="light"] #view-tasks .subsCard,
html[data-theme="light"] #view-tasks .subsQueueStat,
html[data-theme="light"] #view-tasks .subsCardStat,
html[data-theme="light"] #view-tasks .subsDesktopTable .table th {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .94);
  box-shadow: none;
}

html[data-theme="light"] #view-tasks .subsHeroPill,
html[data-theme="light"] #view-tasks .subsLifecycleBadge,
html[data-theme="light"] #view-tasks .subsFollowBadge,
html[data-theme="light"] #view-tasks .subsRemainingSignal,
html[data-theme="light"] #view-tasks .subsEmptyCard,
html[data-theme="light"] #view-tasks .subsQueueEmpty {
  border-color: rgba(11, 18, 32, .10);
}

html[data-theme="light"] #view-tasks .subsHeroPill,
html[data-theme="light"] #view-tasks .subsQueueStat,
html[data-theme="light"] #view-tasks .subsCardStat,
html[data-theme="light"] #view-tasks .subsEmptyCard,
html[data-theme="light"] #view-tasks .subsQueueEmpty {
  background: #fff;
}

html[data-theme="light"] #view-tasks .subsKpiValue,
html[data-theme="light"] #view-tasks .subsKpiHint,
html[data-theme="light"] #view-tasks .subsQueueCustomer,
html[data-theme="light"] #view-tasks .subsQueueProduct,
html[data-theme="light"] #view-tasks .subsQueueDateMain,
html[data-theme="light"] #view-tasks .subsQueueStatValue,
html[data-theme="light"] #view-tasks .subsCustomerName,
html[data-theme="light"] #view-tasks .subsProductTitle,
html[data-theme="light"] #view-tasks .subsRowDateMain,
html[data-theme="light"] #view-tasks .subsHeroPill b,
html[data-theme="light"] #view-tasks .subsCardCustomer,
html[data-theme="light"] #view-tasks .subsCardProduct,
html[data-theme="light"] #view-tasks .subsCardStat b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-tasks .subsKpiLabel,
html[data-theme="light"] #view-tasks .subsKpiMeta,
html[data-theme="light"] #view-tasks .subsQueueMetaLine,
html[data-theme="light"] #view-tasks .subsCustomerMeta,
html[data-theme="light"] #view-tasks .subsProductMeta,
html[data-theme="light"] #view-tasks .subsRowDateMeta,
html[data-theme="light"] #view-tasks .subsRemainingHint,
html[data-theme="light"] #view-tasks .subsFollowMeta,
html[data-theme="light"] #view-tasks .subsResultsMeta,
html[data-theme="light"] #view-tasks .subsTableMeta,
html[data-theme="light"] #view-tasks .subsQueueMeta,
html[data-theme="light"] #view-tasks .subsHeroSearch label {
  color: rgba(11, 18, 32, .62);
}

@media (max-width: 1180px) {
  .subsOverviewGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .subsQueueList {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .subsHeroHead .headRight {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .subsOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subsSegmented {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .subsDesktopTable {
    display: none;
  }

  .subsCards {
    display: grid;
  }
}

@media (max-width: 640px) {
  .subsHeroHead .headRight {
    align-items: stretch;
  }

  .subsHeroMeta {
    flex-direction: column;
  }

  .subsHeroPill {
    width: 100%;
    justify-content: center;
  }

  .subsHeroSearch {
    min-width: 0;
    width: 100%;
  }

  .subsOverviewGrid {
    grid-template-columns: 1fr;
  }

  .subsQueueFooter {
    grid-template-columns: 1fr;
  }

  .subsQueueActions,
  .subsCardActions {
    flex-direction: column;
  }

  .subsQueueActions .btn,
  .subsCardActions .btn {
    width: 100%;
  }
}

/* Reports executive dashboard */
#view-reports {
  gap: 14px;
}

.reportsHead {
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 2px;
}

.reportsHead .sub {
  max-width: 760px;
}

.reportsHeadActions {
  align-items: center;
}

.reportsHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.reportsHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  letter-spacing: .01em;
}

.reportsHeroPill b {
  color: #fff;
  font-weight: 700;
}

.reportsShell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reportsSection {
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .022));
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .2);
}

.reportsSectionHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.reportsSectionHead h3 {
  margin: 4px 0 0;
}

.reportsSectionEyebrow {
  color: rgba(255, 255, 255, .54);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.reportsSectionIntro {
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  line-height: 1.5;
  max-width: 740px;
}

.reportsSectionTag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  white-space: nowrap;
}

.reportsExecutiveGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reportsExecCard {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .022));
}

.reportsExecCard::before {
  content: "";
  position: absolute;
  inset: auto -14% 68% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 123, 40, .16), rgba(254, 123, 40, 0));
  pointer-events: none;
}

.reportsExecCard>* {
  position: relative;
  z-index: 1;
}

.reportsExecTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reportsExecLabel {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

.reportsExecSub {
  margin-top: 6px;
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
}

.reportsExecValue {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #fff;
}

.reportsExecMoney {
  color: var(--warning);
}

.reportsExecNet {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, .82);
}

.reportsExecNet.negative,
.reportsRiskValue.negative {
  color: #ff7b7b;
}

.reportsExecStats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.reportsExecStat {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 10px;
}

.reportsExecStatLabel {
  display: block;
  color: rgba(255, 255, 255, .54);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reportsExecStatValue {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.reportsAttentionStrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reportsRiskCard {
  border-radius: 20px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 10, 16, .84);
}

.reportsRiskCard.warning {
  border-color: rgba(254, 123, 40, .28);
  background: linear-gradient(180deg, rgba(254, 123, 40, .12), rgba(8, 10, 16, .88));
}

.reportsRiskCard.critical {
  border-color: rgba(255, 110, 110, .24);
  background: linear-gradient(180deg, rgba(255, 110, 110, .12), rgba(8, 10, 16, .88));
}

.reportsRiskTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reportsRiskLabel {
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  font-weight: 700;
}

.reportsRiskBadge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reportsRiskValue {
  margin-top: 16px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.03em;
}

.reportsRiskMeta {
  margin-top: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.reportsLevelGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr);
  gap: 14px;
}

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

.reportsChartCard,
.reportsDataCard,
.reportStatCard {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.reportsChartCard {
  padding: 16px;
}

.reportsCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reportsCardHead h4,
.reportsDataCardHead h4 {
  margin: 0;
}

.reportsCardMeta {
  margin-top: 5px;
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
}

.reportsChartState {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
  white-space: nowrap;
}

.reportsChartState.low {
  border-color: rgba(254, 123, 40, .18);
  color: rgba(255, 220, 193, .88);
}

.reportsChartCanvasWrap {
  border-radius: 18px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
}

.reportsChartCanvasWrap canvas {
  width: 100%;
  height: auto;
  min-height: 220px;
}

.reportsChartNote {
  margin-top: 12px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.5;
}

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

.reportsStack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reportsDrillGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.reportStatCard {
  padding: 16px;
}

.reportStatLabel {
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.reportStatValue {
  margin-top: 8px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.reportStatValue.negative {
  color: #ff7b7b;
}

.reportStatMeta {
  margin-top: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

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

.reportsDataCard {
  padding: 16px;
}

.reportsDataCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.reportsDataCardSub {
  margin-top: 5px;
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
}

.reportsMetricList,
.reportsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reportsMetricRow {
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
  border-radius: 16px;
  padding: 12px 13px;
}

.reportsMetricRowTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 14px;
}

.reportsMetricRowTop b {
  font-variant-numeric: tabular-nums;
}

.reportsMetricMeta {
  margin-top: 6px;
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
}

.reportsMetricBar {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.reportsMetricBar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(254, 123, 40, .95), rgba(255, 173, 102, .88));
}

.reportsListItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
  border-radius: 16px;
}

.reportsListLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.reportsListAvatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, rgba(254, 123, 40, .28), rgba(254, 123, 40, .12));
  border: 1px solid rgba(254, 123, 40, .2);
  flex: 0 0 auto;
}

.reportsListTitle {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.reportsListMeta {
  margin-top: 4px;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.reportsListValue {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reportsListValue.alert {
  color: #ff9b75;
}

.reportsEmpty {
  border: 1px dashed rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .02);
  border-radius: 18px;
  padding: 18px;
  color: rgba(255, 255, 255, .66);
  text-align: center;
  font-size: 13px;
}

html[data-theme="light"] .reportsHeroPill,
html[data-theme="light"] .reportsSection,
html[data-theme="light"] .reportsExecCard,
html[data-theme="light"] .reportsRiskCard,
html[data-theme="light"] .reportsChartCard,
html[data-theme="light"] .reportsDataCard,
html[data-theme="light"] .reportStatCard,
html[data-theme="light"] .reportsMetricRow,
html[data-theme="light"] .reportsListItem,
html[data-theme="light"] .reportsChartCanvasWrap,
html[data-theme="light"] .reportsChartState {
  background: #fff;
  color: #111827;
}

html[data-theme="light"] .reportsSection,
html[data-theme="light"] .reportsExecCard,
html[data-theme="light"] .reportsRiskCard,
html[data-theme="light"] .reportsChartCard,
html[data-theme="light"] .reportsDataCard,
html[data-theme="light"] .reportStatCard,
html[data-theme="light"] .reportsMetricRow,
html[data-theme="light"] .reportsListItem,
html[data-theme="light"] .reportsChartCanvasWrap,
html[data-theme="light"] .reportsChartState,
html[data-theme="light"] .reportsHeroPill {
  border-color: rgba(15, 23, 42, .08);
  box-shadow: none;
}

html[data-theme="light"] .reportsExecLabel,
html[data-theme="light"] .reportsExecSub,
html[data-theme="light"] .reportsSectionEyebrow,
html[data-theme="light"] .reportsSectionIntro,
html[data-theme="light"] .reportsSectionTag,
html[data-theme="light"] .reportsCardMeta,
html[data-theme="light"] .reportsChartNote,
html[data-theme="light"] .reportsDataCardSub,
html[data-theme="light"] .reportsMetricMeta,
html[data-theme="light"] .reportsListMeta,
html[data-theme="light"] .reportStatLabel,
html[data-theme="light"] .reportStatMeta,
html[data-theme="light"] .reportsRiskMeta,
html[data-theme="light"] .reportsRiskBadge {
  color: rgba(15, 23, 42, .6);
}

html[data-theme="light"] .reportsExecValue,
html[data-theme="light"] .reportsExecNet,
html[data-theme="light"] .reportsExecStatValue,
html[data-theme="light"] .reportsRiskValue,
html[data-theme="light"] .reportStatValue,
html[data-theme="light"] .reportsMetricRowTop,
html[data-theme="light"] .reportsListTitle,
html[data-theme="light"] .reportsListValue,
html[data-theme="light"] .reportsHeroPill b,
html[data-theme="light"] .reportsRiskLabel {
  color: #111827;
}

@media (max-width: 1180px) {

  .reportsExecutiveGrid,
  .reportsAttentionStrip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reportsLevelGrid {
    grid-template-columns: 1fr;
  }

  .reportsDrillGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .reportsHead {
    flex-direction: column;
  }

  .reportsHeadActions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .reportsChartsGrid,
  .reportsSplitGrid,
  .reportsMetricsGrid,
  .reportsDrillGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .reportsSection {
    padding: 16px;
    border-radius: 20px;
  }

  .reportsExecutiveGrid,
  .reportsAttentionStrip {
    grid-template-columns: 1fr;
  }

  .reportsHeroMeta {
    gap: 8px;
  }

  .reportsHeroPill,
  .reportsSectionTag,
  .reportsChartState {
    width: 100%;
    justify-content: center;
  }

  .reportsExecValue,
  .reportsRiskValue,
  .reportStatValue {
    font-size: 24px;
  }

  .reportsListItem {
    align-items: flex-start;
  }

  .reportsListValue {
    white-space: normal;
    text-align: right;
  }
}

/* Inventory command center */
#view-products {
  gap: 12px;
}

#view-products .inventoryHero {
  padding: 16px 18px;
}

#view-products .inventoryHero .headRight {
  max-width: none;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.inventoryHeroSearch {
  display: grid;
  gap: 6px;
}

.inventoryHeroSearch label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .66);
}

.inventoryHeroMeta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventoryHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
}

.inventoryHeroPill b {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.inventoryHeroPillMuted {
  color: rgba(255, 255, 255, .62);
}

#view-products .invSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.inventoryKpiCard {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  min-height: 156px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(8, 12, 20, .22)),
    rgba(10, 14, 22, .82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.inventoryKpiCard::after {
  content: "";
  position: absolute;
  inset: auto -40px -66px auto;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 78, 14, .10), rgba(254, 78, 14, 0) 72%);
  pointer-events: none;
}

.inventoryKpiCard[data-tone="free"]::after {
  background: radial-gradient(circle, rgba(52, 199, 89, .10), rgba(52, 199, 89, 0) 72%);
}

.inventoryKpiCard[data-tone="reorder"]::after {
  background: radial-gradient(circle, rgba(255, 194, 49, .12), rgba(255, 194, 49, 0) 72%);
}

.inventoryKpiCard[data-tone="capital"]::after {
  background: radial-gradient(circle, rgba(77, 124, 254, .12), rgba(77, 124, 254, 0) 72%);
}

.inventoryKpiCard[data-tone="sales"]::after {
  background: radial-gradient(circle, rgba(52, 199, 89, .18), rgba(52, 199, 89, 0) 72%);
}

.inventoryKpiCard[data-tone="profit"]::after {
  background: radial-gradient(circle, rgba(88, 234, 154, .26), rgba(88, 234, 154, 0) 72%);
}

.inventoryKpiCard[data-tone="alerts"]::after {
  background: radial-gradient(circle, rgba(255, 99, 99, .13), rgba(255, 99, 99, 0) 72%);
}

.inventoryKpiCard[data-tone="capital"] {
  border-color: rgba(77, 124, 254, .16);
  background:
    linear-gradient(180deg, rgba(77, 124, 254, .10), rgba(8, 12, 20, .22)),
    rgba(10, 14, 22, .84);
}

.inventoryKpiCard[data-tone="sales"],
.inventoryKpiCard[data-tone="profit"] {
  border-color: rgba(52, 199, 89, .22);
  background:
    linear-gradient(180deg, rgba(52, 199, 89, .12), rgba(8, 12, 20, .22)),
    rgba(10, 14, 22, .84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    inset 0 0 0 1px rgba(52, 199, 89, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.inventoryKpiCard[data-tone="sales"] .inventoryKpiValue,
.inventoryKpiCard[data-tone="profit"] .inventoryKpiValue {
  color: #f2fff5;
}

.inventoryKpiCard[data-tone="capital"] .inventoryKpiValue {
  color: #edf4ff;
}

.inventoryKpiCard[data-tone="capital"] .inventoryKpiMetaTag {
  border-color: rgba(77, 124, 254, .24);
  background: rgba(77, 124, 254, .16);
  color: rgba(236, 243, 255, .95);
}

.inventoryKpiCard[data-tone="capital"] .inventoryKpiHint {
  color: rgba(221, 232, 255, .80);
}

.inventoryKpiCard[data-tone="capital"] .inventoryKpiLabel {
  color: rgba(220, 231, 255, .70);
}

.inventoryKpiCard[data-tone="sales"] .inventoryKpiLabel,
.inventoryKpiCard[data-tone="profit"] .inventoryKpiLabel {
  color: rgba(223, 255, 232, .72);
}

.inventoryKpiCard[data-tone="sales"] .inventoryKpiMetaTag,
.inventoryKpiCard[data-tone="profit"] .inventoryKpiMetaTag {
  border-color: rgba(52, 199, 89, .24);
  background: rgba(52, 199, 89, .18);
  color: rgba(245, 255, 248, .96);
}

.inventoryKpiCard[data-tone="sales"] .inventoryKpiHint,
.inventoryKpiCard[data-tone="profit"] .inventoryKpiHint {
  color: rgba(220, 255, 229, .82);
}

.inventoryKpiCard[data-tone="profit"] {
  border-color: rgba(88, 234, 154, .28);
  background:
    linear-gradient(180deg, rgba(88, 234, 154, .16), rgba(8, 12, 20, .20)),
    rgba(10, 14, 22, .84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    inset 0 0 0 1px rgba(88, 234, 154, .08),
    0 16px 30px rgba(0, 0, 0, .18);
}

.inventoryKpiCard[data-tone="profit"] .inventoryKpiValue {
  color: #f6fff9;
}

.inventoryKpiCard[data-tone="profit"] .inventoryKpiLabel {
  color: rgba(234, 255, 242, .78);
}

.inventoryKpiCard[data-tone="profit"] .inventoryKpiMetaTag {
  border-color: rgba(88, 234, 154, .26);
  background: rgba(88, 234, 154, .20);
  color: rgba(247, 255, 250, .98);
}

.inventoryKpiCard[data-tone="profit"] .inventoryKpiHint {
  color: rgba(231, 255, 239, .86);
}

.inventoryKpiCard.isClickable {
  cursor: pointer;
}

.inventoryKpiCard.isClickable:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .14);
}

.inventoryKpiCard.isActive {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.inventoryKpiTop {
  display: grid;
  gap: 10px;
  align-items: start;
}

.inventoryKpiLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .60);
  line-height: 1.25;
}

.inventoryKpiValue {
  margin-top: 8px;
  font-size: clamp(28px, 2.7vw, 36px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 990;
  color: rgba(255, 255, 255, .96);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.inventoryKpiMetaTag {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
  max-width: 100%;
}

.inventoryKpiHint {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .72);
}

.inventoryKpiCard[data-tone="capital"],
.inventoryKpiCard[data-tone="sales"],
.inventoryKpiCard[data-tone="profit"] {
  min-height: 168px;
}

.inventoryToolbarPanel {
  position: relative;
  overflow: visible;
  padding: 16px;
  gap: 14px;
  border-color: rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(6, 10, 16, .22));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .14);
}

.inventoryToolbarPanel::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(254, 78, 14, .36), rgba(255, 255, 255, 0));
}

.inventoryToolbarGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(260px, .95fr);
  gap: 12px;
  align-items: start;
}

.inventoryToolbarZone {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.inventoryZoneLabel {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

.inventorySegmented,
.inventoryControlChips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inventorySegmented .chip,
.inventoryControlChips .chip {
  white-space: nowrap;
}

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

.inventoryBufferField {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

.inventoryBufferField span {
  color: inherit;
}

.invBuffer {
  width: 92px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .92);
}

.inventoryUtilityMenu {
  position: relative;
}

.inventoryUtilityMenu[open] {
  z-index: 8;
}

.inventoryUtilityMenu summary {
  list-style: none;
}

.inventoryUtilityMenu summary::-webkit-details-marker {
  display: none;
}

.inventoryUtilityPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(230px, 86vw);
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(16, 22, 34, .96);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .30);
}

.inventoryUtilityItem {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}

.inventoryUtilityItem:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.inventoryResultsMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.inventoryResultsMeta b {
  color: rgba(255, 255, 255, .92);
}

.inventoryResultsFlag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .80);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.inventoryResultsFlag.isDanger {
  border-color: rgba(255, 99, 99, .24);
  background: rgba(255, 99, 99, .10);
  color: #ffd8d8;
}

.inventoryTableWrap {
  padding: 0;
  overflow: hidden;
}

.inventoryDesktopTable {
  display: block;
}

.inventoryCards {
  display: none;
  padding: 14px;
  gap: 12px;
}

.inventoryEmptyState {
  display: grid;
  padding: 16px;
}

.inventoryEmptyCard {
  display: grid;
  gap: 10px;
  padding: 24px 18px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, .12);
  background:
    radial-gradient(circle at top, rgba(254, 78, 14, .09), rgba(254, 78, 14, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015));
  text-align: center;
}

.inventoryEmptyEyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .52);
}

.inventoryEmptyCard h3 {
  margin: 0;
  font-size: 20px;
  color: rgba(255, 255, 255, .95);
}

.inventoryEmptyCard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.inventoryEmptyActions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

#view-products .table {
  min-width: 1280px;
}

#view-products .table th {
  white-space: nowrap;
}

#view-products .table td {
  vertical-align: top;
  padding-top: 14px;
  padding-bottom: 14px;
}

.inventoryTableRow td {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.inventoryTableRow td:first-child {
  position: relative;
}

.inventoryTableRow[data-issue="1"] td {
  background: linear-gradient(180deg, rgba(255, 108, 82, .035), rgba(255, 108, 82, .015));
}

.inventoryTableRow[data-health="reorder"] td:first-child {
  box-shadow: inset 4px 0 0 rgba(255, 116, 82, .75);
}

.inventoryTableRow[data-health="low"] td:first-child {
  box-shadow: inset 4px 0 0 rgba(255, 194, 49, .70);
}

.inventoryTableRow[data-health="bundle"] td:first-child {
  box-shadow: inset 4px 0 0 rgba(254, 78, 14, .62);
}

.inventoryTableRow[data-health="service"] td:first-child {
  box-shadow: inset 4px 0 0 rgba(77, 124, 254, .64);
}

.inventoryTableRow[data-health="component"] td:first-child {
  box-shadow: inset 4px 0 0 rgba(175, 82, 222, .60);
}

.inventoryTableRow[data-kind="component"] td {
  background: rgba(175, 82, 222, .04);
}

.inventoryTableRow.bundleChild td {
  background: rgba(255, 255, 255, .015);
}

.inventoryProductCell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 240px;
}

.inventoryProductAvatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  flex: 0 0 auto;
}

.inventoryProductCopy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pName {
  font-weight: 950;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

.inventoryProductMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.inventoryProductMeta .mono {
  color: rgba(255, 255, 255, .70);
}

.inventoryAlertRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inventoryAlertTag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(254, 123, 40, .95);
  background: rgba(254, 123, 40, .95);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.inventoryAlertTag.isDanger {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
}

#view-products .badge.ok {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

#view-products .badge.subBadge {
  border-color: rgba(52, 199, 89, .95);
  background: rgba(52, 199, 89, .95);
  color: #ffffff;
}

#view-products .badge.svcBadge {
  border-color: rgba(77, 124, 254, .95);
  background: rgba(77, 124, 254, .95);
  color: #ffffff;
}

#view-products .badge.bundleBadge {
  border-color: rgba(254, 78, 14, .95);
  background: rgba(254, 78, 14, .95);
  color: #ffffff;
}

#view-products .badge.reorderBadge {
  border-color: rgba(255, 99, 99, .95);
  background: rgba(255, 99, 99, .95);
  color: #ffffff;
}

#view-products .badge.compBadge {
  border-color: rgba(175, 82, 222, .95);
  background: rgba(175, 82, 222, .95);
  color: #ffffff;
}

#view-products .badge.bundleQty {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .72);
}

.inventoryMetricCell,
.inventoryMoneyCell,
.inventorySuggestedCell {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.inventoryMetricCell strong,
.inventoryMoneyCell strong,
.inventorySuggestedCell strong {
  color: rgba(255, 255, 255, .95);
  font-weight: 950;
}

.inventoryMetricCell.isNegative strong {
  color: #ffd5cc;
}

.inventoryMetricCell small,
.inventoryMoneyCell small {
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
}

.inventorySuggestedCell.isZero strong {
  color: var(--muted);
}

.inventorySupplierCell {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.inventorySupplierCell strong {
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
}

.inventorySupplierCell small {
  color: var(--muted);
  font-size: 11.5px;
}

.inventorySupplierCell.isMissing strong {
  color: #ffd8cf;
}

.inventoryLimiterCell {
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.inventoryLimiterCell b {
  color: rgba(255, 255, 255, .90);
  font-size: 13px;
}

.inventoryLimiterCell span {
  color: var(--muted);
  font-size: 11.5px;
}

.inventoryHealthCell {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.inventoryHealthHint {
  max-width: 190px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}

.miniLink {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .92);
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.miniLink:hover {
  color: #fff;
}

.inventoryActionDock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.inventoryActionDock .btn {
  white-space: nowrap;
}

.inventoryActionMenu {
  position: relative;
}

.inventoryActionMenu[open] {
  z-index: 8;
}

.inventoryActionMenu summary {
  list-style: none;
}

.inventoryActionMenu summary::-webkit-details-marker {
  display: none;
}

.inventoryMenuTrigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.inventoryMenuTrigger:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.inventoryMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(200px, 84vw);
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(16, 22, 34, .96);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .30);
}

.inventoryMenuItem {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .88);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 850;
  cursor: pointer;
}

.inventoryMenuItem:hover {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.inventoryMenuItem:disabled {
  opacity: .54;
  cursor: not-allowed;
}

.inventoryMenuItem.danger {
  border-color: rgba(255, 99, 99, .26);
  background: rgba(255, 99, 99, .10);
  color: #ffd7d7;
}

.groupRow td {
  padding: 10px 14px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .04);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.inventoryGroupLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventoryGroupLine small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.pIndent {
  display: inline-block;
  width: 18px;
  margin-right: 2px;
  color: rgba(255, 255, 255, .35);
}

.deltaPos {
  color: rgba(52, 199, 89, .95);
  font-weight: 900;
}

.deltaNeg {
  color: rgba(255, 59, 48, .95);
  font-weight: 900;
}

.inventoryCardGroup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.inventoryCardGroup small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.inventoryCard {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .14)),
    rgba(10, 14, 22, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .18);
}

.inventoryCard[data-health="reorder"] {
  border-color: rgba(255, 112, 76, .22);
}

.inventoryCard[data-health="low"] {
  border-color: rgba(255, 194, 49, .18);
}

.inventoryCard[data-health="service"] {
  border-color: rgba(77, 124, 254, .18);
}

.inventoryCard[data-health="bundle"] {
  border-color: rgba(254, 78, 14, .18);
}

.inventoryCard[data-health="component"] {
  border-color: rgba(175, 82, 222, .18);
}

.inventoryCard[data-issue="1"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 116, 82, .16);
  pointer-events: none;
}

.inventoryCardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inventoryCardIdentity {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.inventoryCardName {
  font-size: 15px;
  font-weight: 950;
  color: rgba(255, 255, 255, .95);
}

.inventoryCardSub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.inventoryCardStockGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.inventoryCardFinanceGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inventoryCardMetric,
.inventoryCardSupplier,
.inventoryCardHealth {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.inventoryCardMetric span,
.inventoryCardSupplier span {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

.inventoryCardMetric b,
.inventoryCardSupplier b {
  font-size: 14px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.inventoryCardMetric>.miniLink {
  font-size: 14px;
  font-weight: 950;
  color: rgba(255, 255, 255, .94);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.inventoryCardMetric b.isNegative {
  color: #ffd5cb;
}

.inventoryCardSupplier b {
  font-family: inherit;
}

.inventoryCardSupplier small {
  color: var(--muted);
  font-size: 11.5px;
}

.inventoryCardHealth {
  padding: 12px;
}

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

.inventoryCardActions .inventoryActionDock {
  width: 100%;
  justify-content: flex-start;
}

html[data-theme="light"] #view-products .inventoryKpiCard,
html[data-theme="light"] #view-products .inventoryToolbarZone,
html[data-theme="light"] #view-products .inventoryCard,
html[data-theme="light"] #view-products .inventoryCardMetric,
html[data-theme="light"] #view-products .inventoryCardSupplier,
html[data-theme="light"] #view-products .inventoryCardHealth,
html[data-theme="light"] #view-products .inventoryEmptyCard {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: none;
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"],
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] {
  border-color: rgba(23, 163, 92, .22);
  background:
    linear-gradient(180deg, rgba(52, 199, 89, .16), rgba(255, 255, 255, .96)),
    rgba(255, 255, 255, .96);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="capital"] {
  border-color: rgba(77, 124, 254, .18);
  background:
    linear-gradient(180deg, rgba(77, 124, 254, .12), rgba(255, 255, 255, .96)),
    rgba(255, 255, 255, .96);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"],
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] {
  border-color: rgba(23, 163, 92, .22);
  background:
    linear-gradient(180deg, rgba(52, 199, 89, .16), rgba(255, 255, 255, .96)),
    rgba(255, 255, 255, .96);
}

html[data-theme="light"] #view-products .inventoryHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .84);
  color: rgba(11, 18, 32, .72);
}

html[data-theme="light"] #view-products .inventoryHeroPill b,
html[data-theme="light"] #view-products .inventoryKpiValue,
html[data-theme="light"] #view-products .inventoryEmptyCard h3,
html[data-theme="light"] #view-products .inventoryProductAvatar,
html[data-theme="light"] #view-products .inventorySupplierCell strong,
html[data-theme="light"] #view-products .inventoryLimiterCell b,
html[data-theme="light"] #view-products .inventoryCardName,
html[data-theme="light"] #view-products .inventoryCardMetric b,
html[data-theme="light"] #view-products .inventoryCardMetric>.miniLink,
html[data-theme="light"] #view-products .inventoryCardSupplier b,
html[data-theme="light"] #view-products .inventoryResultsMeta b,
html[data-theme="light"] #view-products .inventoryMetricCell strong,
html[data-theme="light"] #view-products .inventoryMoneyCell strong,
html[data-theme="light"] #view-products .inventorySuggestedCell strong,
html[data-theme="light"] #view-products .pName {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-products .inventoryHeroPillMuted,
html[data-theme="light"] #view-products .inventoryHeroSearch label,
html[data-theme="light"] #view-products .inventoryKpiLabel,
html[data-theme="light"] #view-products .inventoryKpiHint,
html[data-theme="light"] #view-products .inventoryProductMeta,
html[data-theme="light"] #view-products .inventorySupplierCell small,
html[data-theme="light"] #view-products .inventoryLimiterCell span,
html[data-theme="light"] #view-products .inventoryHealthHint,
html[data-theme="light"] #view-products .inventoryZoneLabel,
html[data-theme="light"] #view-products .inventoryResultsMeta,
html[data-theme="light"] #view-products .inventoryGroupLine small,
html[data-theme="light"] #view-products .inventoryCardSub,
html[data-theme="light"] #view-products .inventoryCardSupplier small,
html[data-theme="light"] #view-products .inventoryEmptyCard p,
html[data-theme="light"] #view-products .inventoryCardGroup small {
  color: rgba(11, 18, 32, .62);
}

html[data-theme="light"] #view-products .inventoryResultsFlag {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .96);
  color: rgba(11, 18, 32, .78);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiValue,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiValue {
  color: rgba(8, 84, 44, .96);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="capital"] .inventoryKpiValue {
  color: rgba(22, 58, 120, .96);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiMetaTag,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiMetaTag {
  border-color: rgba(23, 163, 92, .20);
  background: rgba(52, 199, 89, .14);
  color: rgba(8, 84, 44, .92);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="capital"] .inventoryKpiMetaTag {
  border-color: rgba(77, 124, 254, .18);
  background: rgba(77, 124, 254, .12);
  color: rgba(22, 58, 120, .90);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiHint,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiHint,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiLabel,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiLabel {
  color: rgba(11, 94, 52, .72);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="capital"] .inventoryKpiHint,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="capital"] .inventoryKpiLabel {
  color: rgba(36, 74, 138, .70);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiValue,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiValue {
  color: rgba(8, 84, 44, .96);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiMetaTag,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiMetaTag {
  border-color: rgba(23, 163, 92, .20);
  background: rgba(52, 199, 89, .14);
  color: rgba(8, 84, 44, .92);
}

html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiHint,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiHint,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="sales"] .inventoryKpiLabel,
html[data-theme="light"] #view-products .inventoryKpiCard[data-tone="profit"] .inventoryKpiLabel {
  color: rgba(11, 94, 52, .72);
}

html[data-theme="light"] #view-products .table th {
  background: rgba(245, 247, 251, .98);
  color: rgba(11, 18, 32, .68);
}

html[data-theme="light"] #view-products .inventoryTableRow td {
  border-bottom: 1px solid rgba(11, 18, 32, .08);
}

html[data-theme="light"] #view-products .inventoryTableRow:hover td {
  background: rgba(11, 18, 32, .03);
}

html[data-theme="light"] #view-products .inventoryMenuTrigger,
html[data-theme="light"] #view-products .inventoryMenuPanel,
html[data-theme="light"] #view-products .inventoryMenuItem,
html[data-theme="light"] #view-products .inventoryUtilityPanel,
html[data-theme="light"] #view-products .inventoryUtilityItem {
  border-color: rgba(11, 18, 32, .10);
}

html[data-theme="light"] #view-products .inventoryMenuTrigger,
html[data-theme="light"] #view-products .inventoryMenuItem,
html[data-theme="light"] #view-products .inventoryUtilityItem {
  background: rgba(255, 255, 255, .96);
  color: rgba(11, 18, 32, .88);
}

html[data-theme="light"] #view-products .inventoryMenuPanel,
html[data-theme="light"] #view-products .inventoryUtilityPanel {
  background: rgba(255, 255, 255, .98);
}

@media (max-width: 1200px) {
  #view-products .invSummary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .inventoryToolbarGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventoryToolbarZone:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  #view-products .inventoryHero {
    gap: 14px;
  }

  #view-products .inventoryHero .headRight {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
  }

  #view-products .invSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventoryToolbarGrid {
    grid-template-columns: 1fr;
  }

  .inventorySegmented,
  .inventoryControlChips {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .inventorySegmented::-webkit-scrollbar,
  .inventoryControlChips::-webkit-scrollbar {
    display: none;
  }

  .inventoryDesktopTable {
    display: none;
  }

  .inventoryCards {
    display: grid;
  }
}

@media (max-width: 760px) {
  #view-products .inventoryHero {
    padding: 16px;
  }

  #view-products .invSummary {
    grid-template-columns: 1fr;
  }

  .inventoryToolbarPanel {
    padding: 14px;
  }

  .inventoryUtilityBar {
    align-items: stretch;
  }

  .inventoryBufferField input {
    width: 100%;
  }

  .inventoryCardTop {
    flex-direction: column;
  }

  .inventoryCardStockGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventoryCardFinanceGrid {
    grid-template-columns: 1fr;
  }

  .inventoryCardActions,
  .inventoryActionDock {
    width: 100%;
    justify-content: flex-start;
  }

  .inventoryMenuPanel,
  .inventoryUtilityPanel {
    right: auto;
    left: 0;
  }
}

@media (max-width: 520px) {
  .inventoryEmptyCard {
    padding: 22px 16px;
  }
}

/* Trash & recovery center */
#view-trash {
  gap: 12px;
}

.trashHead {
  padding: 14px 18px;
}

.trashHead .productHeroIntro {
  padding-top: 14px;
}

.trashHead .productHeroIntro h1 {
  font-size: clamp(26px, 3.4vw, 34px);
}

.trashHead .headRight {
  width: min(420px, 100%);
}

.trashSearchWrap {
  display: grid;
  gap: 6px;
}

.trashSearchWrap label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .66);
}

.trashHeroMeta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trashHeroPill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
}

.trashHeroPill b {
  color: rgba(255, 255, 255, .96);
  font-weight: 950;
}

.trashHeroPillMuted {
  color: rgba(255, 255, 255, .62);
}

.trashSummaryGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.trashSummaryCard {
  display: grid;
  gap: 8px;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .12)),
    rgba(10, 14, 22, .84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 14px 28px rgba(0, 0, 0, .16);
}

.trashSummaryCard[data-tone="safe"] {
  border-color: rgba(52, 199, 89, .18);
  background:
    linear-gradient(180deg, rgba(52, 199, 89, .10), rgba(0, 0, 0, .12)),
    rgba(10, 14, 22, .84);
}

.trashSummaryCard[data-tone="danger"] {
  border-color: rgba(255, 99, 99, .22);
  background:
    linear-gradient(180deg, rgba(255, 99, 99, .10), rgba(0, 0, 0, .12)),
    rgba(10, 14, 22, .84);
}

.trashSummaryCard[data-tone="today"] {
  border-color: rgba(254, 123, 40, .20);
}

.trashSummaryLabel {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .56);
}

.trashSummaryValue {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 1000;
  color: rgba(255, 255, 255, .96);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.trashSummaryMeta {
  color: rgba(255, 255, 255, .80);
  font-size: 13px;
  font-weight: 800;
}

.trashSummaryHint {
  color: rgba(255, 255, 255, .60);
  font-size: 12px;
  line-height: 1.45;
}

.trashToolbarPanel,
.trashTablePanel {
  gap: 14px;
}

.trashToolbarMeta,
.trashSelectionMeta,
.trashTableMeta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  text-align: right;
}

.trashToolbarMeta b,
.trashSelectionMeta b,
.trashTableMeta b {
  color: #fff;
}

.trashSegmented {
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.trashSegmented::-webkit-scrollbar {
  display: none;
}

.trashActionBar {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .12)),
    rgba(10, 14, 22, .76);
}

.trashSelectionMeta {
  justify-content: flex-start;
  text-align: left;
}

.trashActionGroups {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trashSafeActions,
.trashDangerActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trashDangerActions {
  margin-left: auto;
}

#view-trash .ghostDanger {
  border-color: rgba(255, 99, 99, .32);
  background: rgba(255, 99, 99, .08);
  color: #ffd7d7;
}

.trashEmptyState.hidden {
  display: none;
}

.trashEmptyCard {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 24px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .12)),
    rgba(10, 14, 22, .76);
}

.trashEmptyIcon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 1000;
  color: #fff;
  border: 1px solid rgba(254, 123, 40, .24);
  background: rgba(254, 123, 40, .14);
}

.trashEmptyEyebrow {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .48);
}

.trashEmptyCard h3 {
  margin: 0;
  color: rgba(255, 255, 255, .95);
}

.trashEmptyCard p,
.trashEmptyNote {
  color: rgba(255, 255, 255, .68);
  line-height: 1.5;
}

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

.trashTableWrap {
  margin-top: 0;
}

#view-trash .trashTable {
  min-width: 1040px;
}

#view-trash .trashTable th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(16, 22, 34, .94);
}

.trashColCheck {
  width: 50px
}

.trashColDate {
  width: 172px
}

.trashColType {
  width: 112px
}

.trashColRef {
  width: 104px
}

.trashColActions {
  width: 220px
}

.trashSelectCell {
  vertical-align: middle;
}

.trashSelectCell input,
.trashCardCheck input,
#trashSelectAll {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.trashDeletedMain,
.trashRefMain {
  color: rgba(255, 255, 255, .94);
  font-weight: 900;
}

.trashDeletedSub,
.trashRefSub,
.trashRowSub,
.trashRowNote {
  color: rgba(255, 255, 255, .60);
  font-size: 12px;
  line-height: 1.45;
}

.trashRefSub {
  text-transform: uppercase;
  letter-spacing: .08em;
}

.trashRowTitle {
  color: rgba(255, 255, 255, .95);
  font-size: 14px;
  font-weight: 950;
}

.trashRowSub {
  margin-top: 4px;
}

.trashRowNote {
  margin-top: 6px;
}

.trashTypeBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .84);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.trashActionDock {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.trashCards {
  display: none;
  gap: 12px;
}

.trashCard {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .14)),
    rgba(10, 14, 22, .84);
}

.trashCard[data-selected="1"] {
  border-color: rgba(254, 123, 40, .22);
  box-shadow: inset 0 0 0 1px rgba(254, 123, 40, .16);
}

.trashCardHead,
.trashCardMeta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.trashCardCheck {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trashCardRef {
  color: rgba(255, 255, 255, .72);
  font-weight: 850;
}

.trashCardMeta {
  gap: 12px;
  flex-wrap: wrap;
}

.trashCardMeta div {
  display: grid;
  gap: 4px;
}

.trashCardMeta span {
  color: rgba(255, 255, 255, .54);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.trashCardMeta b {
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
}

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

html[data-theme="light"] #view-trash .trashSummaryCard,
html[data-theme="light"] #view-trash .trashActionBar,
html[data-theme="light"] #view-trash .trashEmptyCard,
html[data-theme="light"] #view-trash .trashCard,
html[data-theme="light"] #view-trash .trashTable th {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .94);
  box-shadow: none;
}

html[data-theme="light"] #view-trash .trashTypeBadge,
html[data-theme="light"] #view-trash .trashHeroPill {
  border-color: rgba(11, 18, 32, .10);
  background: rgba(245, 247, 251, .96);
  color: rgba(11, 18, 32, .78);
}

html[data-theme="light"] #view-trash .trashSummaryValue,
html[data-theme="light"] #view-trash .trashSummaryMeta,
html[data-theme="light"] #view-trash .trashDeletedMain,
html[data-theme="light"] #view-trash .trashRefMain,
html[data-theme="light"] #view-trash .trashRowTitle,
html[data-theme="light"] #view-trash .trashCardMeta b,
html[data-theme="light"] #view-trash .trashHeroPill b {
  color: rgba(11, 18, 32, .92);
}

html[data-theme="light"] #view-trash .trashSummaryLabel,
html[data-theme="light"] #view-trash .trashSummaryHint,
html[data-theme="light"] #view-trash .trashToolbarMeta,
html[data-theme="light"] #view-trash .trashSelectionMeta,
html[data-theme="light"] #view-trash .trashTableMeta,
html[data-theme="light"] #view-trash .trashDeletedSub,
html[data-theme="light"] #view-trash .trashRefSub,
html[data-theme="light"] #view-trash .trashRowSub,
html[data-theme="light"] #view-trash .trashRowNote,
html[data-theme="light"] #view-trash .trashCardMeta span,
html[data-theme="light"] #view-trash .trashSearchWrap label,
html[data-theme="light"] #view-trash .trashHeroPillMuted,
html[data-theme="light"] #view-trash .trashEmptyCard p,
html[data-theme="light"] #view-trash .trashEmptyNote {
  color: rgba(11, 18, 32, .62);
}

@media (max-width: 1100px) {
  .trashSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trashHead .headRight {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .trashActionGroups {
    flex-direction: column;
    align-items: stretch;
  }

  .trashDangerActions {
    margin-left: 0;
  }

  .trashTableWrap {
    display: none;
  }

  .trashCards {
    display: grid;
  }
}

@media (max-width: 760px) {
  .trashHead {
    padding: 14px 16px;
  }

  .trashSummaryGrid {
    grid-template-columns: 1fr;
  }

  .trashToolbarPanel,
  .trashTablePanel {
    padding: 14px;
  }

  .trashSegmented {
    gap: 8px;
  }

  .trashSafeActions,
  .trashDangerActions,
  .trashCardActions,
  .trashEmptyActions {
    width: 100%;
  }

  .trashSafeActions .btn,
  .trashDangerActions .btn,
  .trashCardActions .btn {
    width: 100%;
  }
}


/* Mobile polish: reduce blur/shadow + increase tap targets */
@media (pointer: coarse) {
  :root {
    --glassBlur: 10px;
    --shadow: 0 10px 24px rgba(0, 0, 0, .28);
  }

  .btn {
    padding: 12px 14px;
    min-height: 44px;
  }

  .btn.small {
    padding: 10px 12px;
    min-height: 44px;
  }

  .chip {
    padding: 10px 12px;
    min-height: 44px;
    font-size: 13px;
  }

  .iconbtn {
    width: 44px;
    height: 44px;
  }

  .navItem {
    padding: 12px 12px;
  }

  .menuItem {
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  :root {
    --glassBlur: 10px;
    --shadow: 0 10px 24px rgba(0, 0, 0, .26);
  }

  .shell {
    padding: 14px;
  }
}

/* Language selector (Auth) */
.authLangSel {
  width: 110px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  outline: none;
}


/* =====================================================================
   RESPONSIVE ARCHITECTURE SYSTEM v2.0
   Full-app responsive overhaul — iPhone, Android, Tablet, Laptop, Desktop
   
   Breakpoint strategy:
     320–389  : Small phones (iPhone SE, older Android)
     390–429  : Standard phones (iPhone 14/15, Galaxy S)
     430–767  : Large phones / phablets
     768–1023 : Tablets (iPad Mini, iPad, Android tablets)
     1024–1439: Small laptops, iPad Pro landscape
     1440+    : Desktop / wide screens
   
   RULES:
   - No existing CSS changed — overrides ONLY via cascade
   - No business logic touched
   - No inline styles added
   - Premium aesthetic preserved
   ===================================================================== */

/* ─── GLOBAL LAYOUT SAFETY ─── */
.shell,
.main,
.card,
.view,
.productLayout,
.productPanel,
.grid2,
.form,
.head,
.headRight,
.moduleViewShell,
.moduleProLayout {
  min-width: 0;
}

.main>* {
  min-width: 0;
}

/* Allow explicit table scrolls */
.tableWrap,
.moduleTableSurface {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal overflow ONLY on mobile (desktop needs overflow
   visible for lookup panels, tooltips & absolute-positioned elements) */
@media (max-width: 980px) {

  .card,
  .view {
    overflow-x: hidden;
  }
}


/* =====================================================================
   BREAKPOINT: 1440+ (Wide Desktop)
   Keep existing layout, ensure no overflow, luxury spacing
   ===================================================================== */
@media (min-width: 1440px) {
  .shell {
    max-width: 1780px;
    padding: 20px;
    gap: 18px;
  }

  .main {
    gap: 16px;
  }

  .card {
    padding: 16px;
  }

  /* Dashboard hero gets more breathing space */
  .dashCommandHero,
  .commandDash .dashHero {
    padding: 22px;
  }

  /* KPI grids can be more spread */
  .dashKpis {
    gap: 14px;
  }
}


/* =====================================================================
   BREAKPOINT: 1024–1439 (Small Laptops)
   ===================================================================== */
@media (min-width: 1024px) and (max-width: 1439px) {
  .shell {
    max-width: 100%;
    padding: 16px;
    gap: 14px;
  }

  /* productLayout 2-col forms: allow narrower columns */
  .productLayout {
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr);
    gap: 12px;
  }

  #view-newOrder .productLayout {
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr);
  }

  /* Business profile layout */
  .businessProfileLayout {
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr);
  }

  /* Settings layout */
  .settingsLayout {
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr);
  }
}


/* =====================================================================
   BREAKPOINT: 768–1023 (Tablets)
   Desktop sidebar transitions to off-canvas.
   2-column layouts where useful, single-column for forms.
   ===================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {

  /* Shell */
  .shell {
    padding: 14px;
    gap: 12px;
  }

  /* All grids and product layouts -> single column on tablet */
  .productLayout,
  #view-newOrder .productLayout,
  #view-newStock .productLayout,
  #view-newExpense .productLayout,
  .businessProfileLayout,
  .settingsLayout,
  .customerEntryLayout,
  .newProductLayout,
  #view-newDebt .financeNewLayout,
  #view-newPayment .financeNewLayout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Context grids stay 2-col */
  .debtContextGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .paymentContextGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customerEntryContextGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Dashboard */
  .dashKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commandGrid,
  .cleanGrid {
    grid-template-columns: 1fr;
  }

  /* Hero heads */
  .productHeroHead {
    padding: 16px;
    border-radius: 18px;
  }

  .productHeroIntro {
    min-width: 0;
    width: 100%;
  }

  .productHeroIntro h1 {
    font-size: clamp(24px, 3.5vw, 36px);
  }

  /* Charts */
  .chartCanvas {
    height: 190px;
  }

  /* Reports KPI */
  .kpiGrid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Orders overview stay 2-col */
  .ordersOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Debt summary grid */
  .debtSummaryGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Payment summary grid */
  .paymentSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Expense stats 2-col */
  .expenseStatsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Order edit stats 2-col */
  .orderEditStats,
  .orderLedgerSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =====================================================================
   BREAKPOINT: 430–767 (Large Phones / Phablets)
   ===================================================================== */
@media (min-width: 430px) and (max-width: 767px) {

  /* Tighten shell padding */
  .shell {
    padding: 0;
  }

  .main {
    gap: 10px;
  }

  .card {
    padding: 12px;
    border-radius: 16px;
  }

  /* All product layouts single column */
  .productLayout,
  #view-newOrder .productLayout,
  #view-newStock .productLayout,
  #view-newExpense .productLayout,
  .businessProfileLayout,
  .settingsLayout,
  .customerEntryLayout,
  .newProductLayout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Grid2 must be single column */
  .grid2 {
    grid-template-columns: 1fr;
  }

  /* Hero compact */
  .productHeroHead {
    padding: 14px;
    border-radius: 16px;
  }

  .productHeroHead::before {
    left: 14px;
    width: 62px;
    height: 6px;
    top: 12px;
  }

  .productHeroIntro {
    min-width: 0;
    width: 100%;
    padding-top: 14px;
  }

  .productHeroIntro h1 {
    font-size: clamp(22px, 5vw, 30px);
  }

  .productHeroIntro .sub {
    font-size: 12px;
  }

  /* Page headers: stack vertically */
  .head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .headRight {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  /* KPIs single col */
  .dashKpis,
  .kpiGrid4,
  .dashGrid4 {
    grid-template-columns: 1fr;
  }

  /* Overview grids 2-col on phablets */
  .ordersOverviewGrid,
  .debtOverviewGrid,
  .stockOverviewGrid,
  .crmOverviewGrid,
  .paymentsOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Expense stats 2-col */
  .expenseStatsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Context cards grids -> 2 col */
  .debtContextGrid,
  .paymentContextGrid,
  .customerEntryContextGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Summary grids compact */
  .debtSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paymentSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paymentSummaryItemPrimary {
    grid-column: 1 / -1;
  }

  /* Charts smaller */
  .chartCanvas {
    height: 170px;
  }

  /* Chip bars horizontal scroll */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  /* Action bars stack */
  .debtFormActionBar,
  .paymentFormActionBar,
  .customerFormActionBar {
    flex-direction: column;
    align-items: stretch;
  }

  .debtFormActionButtons,
  .paymentFormActionButtons,
  .customerFormActionButtons {
    width: 100%;
  }

  .debtFormActionButtons .btn,
  .paymentFormActionButtons .btn,
  .customerFormActionButtons .btn {
    flex: 1 1 0;
  }

  /* Toolbar grids 1-col */
  .stockToolbarGrid,
  .debtToolbarGrid {
    grid-template-columns: 1fr;
  }

  /* Deposit summary 1-col */
  .depositSummary {
    grid-template-columns: 1fr;
  }

  /* Installment KPIs 2-col */
  .installmentCenterKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Order edit grids */
  .orderEditStats,
  .orderLedgerSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orderEditGrid {
    grid-template-columns: 1fr;
  }

  /* Settings security overview */
  .settingsSecurityOverview {
    grid-template-columns: 1fr;
  }

  /* Business preview grid */
  .businessPreviewGrid {
    grid-template-columns: 1fr;
  }

  /* Dashboard section */
  .dashHero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashHeroTopRow {
    grid-template-columns: 1fr;
  }

  .dashHeroRight {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
  }

  .dashActions,
  .dashPills {
    justify-content: flex-start;
  }

  /* Trash summary grid */
  .trashSummaryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Subscription KPIs */
  .subsKpiGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subsOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =====================================================================
   BREAKPOINT: 390–429 (Standard Phones)
   ===================================================================== */
@media (min-width: 390px) and (max-width: 429px) {
  .card {
    padding: 10px;
    border-radius: 14px;
  }

  /* Product panels tighter */
  .productPanel {
    padding: 12px;
    border-radius: 16px;
  }

  .productPanelHead h3 {
    font-size: 14px;
  }

  .productPanelHead p {
    font-size: 11.5px;
  }

  /* Hero compact */
  .productHeroIntro h1 {
    font-size: 22px;
  }

  /* All overview grids -> single column */
  .ordersOverviewGrid,
  .debtOverviewGrid,
  .stockOverviewGrid,
  .crmOverviewGrid,
  .paymentsOverviewGrid,
  .subsOverviewGrid {
    grid-template-columns: 1fr;
  }

  /* Expense stats 1-col */
  .expenseStatsGrid {
    grid-template-columns: 1fr;
  }

  /* Context grids 1-col */
  .debtContextGrid,
  .paymentContextGrid,
  .paymentLinkGrid {
    grid-template-columns: 1fr;
  }

  .customerEntryContextGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Summary grids 1-col */
  .debtSummaryGrid {
    grid-template-columns: 1fr;
  }

  .paymentSummaryGrid {
    grid-template-columns: 1fr;
  }

  /* Dashboard */
  .dashKpis {
    grid-template-columns: 1fr;
  }

  .dashTitle {
    font-size: 22px;
  }

  /* KPI v2 min-height remove */
  .kpiV2 {
    min-height: 0;
  }

  /* Installment KPIs single col */
  .installmentCenterKpis {
    grid-template-columns: 1fr;
  }

  /* Order edit stats */
  .orderEditStats,
  .orderLedgerSummary {
    grid-template-columns: 1fr;
  }

  /* Action bars stretch */
  .debtFormActionButtons,
  .paymentFormActionButtons,
  .customerFormActionButtons {
    display: grid;
  }

  .debtFormActionButtons .btn,
  .paymentFormActionButtons .btn,
  .customerFormActionButtons .btn {
    width: 100%;
  }

  /* Form row stacking */
  .row {
    flex-direction: column;
  }

  .row .btn {
    width: 100%;
  }

  /* Trash summary */
  .trashSummaryGrid {
    grid-template-columns: 1fr;
  }

  /* Subs KPIs */
  .subsKpiGrid {
    grid-template-columns: 1fr;
  }

  /* Charts */
  .chartCanvas {
    height: 160px;
  }
}


/* =====================================================================
   BREAKPOINT: 320–389 (Small Phones)
   Ultra-compact: everything single column, minimal padding
   ===================================================================== */
@media (max-width: 389px) {

  /* Micro spacing */
  .card {
    padding: 8px;
    border-radius: 12px;
  }

  .productPanel {
    padding: 10px;
    border-radius: 14px;
  }

  h1 {
    font-size: 16px;
  }

  .sub {
    font-size: 11px;
  }

  /* Hero ultra-compact */
  .productHeroHead {
    padding: 10px;
    border-radius: 14px;
  }

  .productHeroHead::before {
    width: 48px;
    height: 5px;
    left: 10px;
    top: 10px;
  }

  .productHeroIntro {
    padding-top: 10px;
    gap: 5px;
  }

  .productHeroIntro h1 {
    font-size: 20px;
  }

  .productHeroIntro .sub {
    font-size: 11px;
  }

  .productHeroEyebrow {
    font-size: 10px;
    letter-spacing: .12em;
  }

  .productPanelHead h3 {
    font-size: 13px;
  }

  .productPanelHead p {
    font-size: 11px;
  }

  /* All grids 1-col */
  .grid2,
  .subgrid2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .productLayout,
  #view-newOrder .productLayout,
  #view-newStock .productLayout,
  #view-newExpense .productLayout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* All overview grids 1-col */
  .ordersOverviewGrid,
  .debtOverviewGrid,
  .stockOverviewGrid,
  .crmOverviewGrid,
  .paymentsOverviewGrid,
  .expenseStatsGrid,
  .subsOverviewGrid,
  .trashSummaryGrid {
    grid-template-columns: 1fr;
  }

  /* All context grids 1-col */
  .debtContextGrid,
  .paymentContextGrid,
  .paymentLinkGrid,
  .paymentSummaryGrid,
  .debtSummaryGrid,
  .customerEntryContextGrid {
    grid-template-columns: 1fr;
  }

  /* Dashboard */
  .dashKpis,
  .dashGrid4,
  .kpiGrid4 {
    grid-template-columns: 1fr;
  }

  .dashTitle {
    font-size: 20px;
  }

  .kpiV2 {
    min-height: 0;
    padding: 10px;
  }

  .kpiBig {
    padding: 8px;
  }

  .kpiBigVal {
    font-size: 16px;
  }

  /* Charts */
  .chartCanvas {
    height: 140px;
  }

  /* Order money grid */
  .oMoney {
    grid-template-columns: 1fr;
  }

  /* Order cards */
  .orderCardMoneyGrid,
  .orderCardStateGrid {
    grid-template-columns: 1fr;
  }

  /* All action bars stack */
  .debtFormActionBar,
  .paymentFormActionBar,
  .customerFormActionBar {
    flex-direction: column;
    align-items: stretch;
  }

  .debtFormActionButtons,
  .paymentFormActionButtons,
  .customerFormActionButtons {
    display: grid;
    width: 100%;
  }

  .debtFormActionButtons .btn,
  .paymentFormActionButtons .btn,
  .customerFormActionButtons .btn {
    width: 100%;
  }

  .row {
    flex-direction: column;
  }

  .row .btn {
    width: 100%;
  }

  /* Deposit */
  .depositSummary {
    grid-template-columns: 1fr;
  }

  .depositCardHead {
    flex-direction: column;
  }

  .depositToggle {
    width: 100%;
  }

  /* Installment */
  .installmentCenterKpis {
    grid-template-columns: 1fr;
  }

  /* Order edit */
  .orderEditStats,
  .orderLedgerSummary,
  .orderEditGrid {
    grid-template-columns: 1fr;
  }

  /* Dialog */
  .dlgCard {
    width: min(98vw, 98vw);
    padding: 10px;
  }

  /* Business preview */
  .businessPreviewGrid {
    grid-template-columns: 1fr;
  }

  .settingsSecurityOverview {
    grid-template-columns: 1fr;
  }

  /* Subscriptions */
  .subsKpiGrid {
    grid-template-columns: 1fr;
  }

  /* Badge / pill compact */
  .pill {
    font-size: 10px;
    padding: 5px 8px;
  }

  /* Mini compact */
  .mini {
    font-size: 11px;
  }
}


/* =====================================================================
   FORM RESPONSIVENESS — Global
   Make sure multi-col forms collapse gracefully everywhere
   ===================================================================== */
@media (max-width: 767px) {

  /* All grid2 forced single-col below tablet */
  .grid2 {
    grid-template-columns: 1fr;
  }

  .subgrid2 {
    grid-template-columns: 1fr;
  }

  /* span2 no longer meaningful */
  .span2 {
    grid-column: auto;
  }

  /* Form fields full width */
  .field input,
  .field select,
  .field textarea {
    width: 100%;
    max-width: 100%;
  }

  /* City pick stacks */
  .cityPick {
    flex-direction: column;
  }

  .cityPick input {
    width: 100%;
  }

  /* Check line wraps */
  .checkLine {
    flex-wrap: wrap;
  }

  /* Lookup panels full-width */
  .lookupPanel {
    left: 0;
    right: 0;
  }

  /* Form rows stack */
  .row {
    flex-direction: column;
  }

  .row .btn {
    width: 100%;
  }
}


/* =====================================================================
   TABLE & DENSE DATA — Mobile card fallback
   ===================================================================== */
/* On tablet and below, tables with desktop wrappers are hidden, cards shown.
   This is already handled by existing CSS per-module.
   These rules ensure ALL table wraps are scrollable if visible. */
@media (max-width: 980px) {
  .tableWrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tableWrap::-webkit-scrollbar {
    height: 6px;
  }

  .tableWrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .03);
  }

  .tableWrap::-webkit-scrollbar-thumb {
    background: rgba(254, 78, 14, .35);
    border-radius: 999px;
  }

  /* Module table surfaces */
  .moduleTableSurface {
    max-width: 100%;
    overflow-x: auto;
  }
}


/* =====================================================================
   HEADER & ACTION BARS — Responsive stacking
   ===================================================================== */
@media (max-width: 767px) {

  /* All hero heads stack */
  .head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .headRight {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  /* Search bars full width */
  .headRight .search {
    width: 100%;
    min-width: 0;
    order: -1;
  }

  /* Primary buttons full width */
  .headRight .btn.primary {
    width: 100%;
    text-align: center;
  }

  /* Module hero heads */
  .moduleProLayout>.moduleHeroHead {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .moduleProLayout>.moduleHeroHead .headRight {
    max-width: none;
    justify-self: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .moduleProLayout>.moduleHeroHead .headRight .search {
    flex: 1 1 100%;
    width: 100%;
  }

  /* Hero search fields */
  .ordersHeroSearchField,
  .ordersHeroRouteField,
  .stockHeroSearch,
  .debtHeroSearch,
  .crmHeroSearch,
  .inventoryHeroSearch,
  .trashSearchWrap {
    width: 100%;
    min-width: 0;
  }

  .ordersHeroSearchField .search,
  .stockHeroSearch .search,
  .debtHeroSearch .search,
  .crmHeroSearch .search,
  .inventoryHeroSearch .search,
  .trashSearchWrap .search {
    width: 100%;
    min-width: 0;
  }

  /* Route controls */
  .ordersRouteControls {
    grid-template-columns: 1fr;
    width: 100%;
  }
}


/* =====================================================================
   CHIP / FILTER BAR RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {

  /* All chip bars: horizontal scroll, no wrap */
  .chips,
  .ordersSegmented,
  .stockSegmented,
  .debtSegmented,
  .crmSegmented,
  .paymentsSegmented,
  .expenseSegmented,
  .subsSegmented,
  .trashSegmented,
  .inventorySegmented,
  .inventoryControlChips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 6px;
  }

  .chips::-webkit-scrollbar,
  .ordersSegmented::-webkit-scrollbar,
  .stockSegmented::-webkit-scrollbar,
  .debtSegmented::-webkit-scrollbar,
  .crmSegmented::-webkit-scrollbar,
  .paymentsSegmented::-webkit-scrollbar,
  .expenseSegmented::-webkit-scrollbar,
  .subsSegmented::-webkit-scrollbar,
  .trashSegmented::-webkit-scrollbar,
  .inventorySegmented::-webkit-scrollbar,
  .inventoryControlChips::-webkit-scrollbar {
    display: none;
  }

  /* Chips min-width to prevent text collapse */
  .chip {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* .sep hidden */
  .chips .sep,
  .ordersSegmented .sep {
    display: none;
  }
}


/* =====================================================================
   CARDS & GRID RESPONSIVENESS — Fluid heights
   ===================================================================== */
/* Remove fixed heights, allow content-driven sizing */
.dashCard,
.kpiV2,
.expenseStatCard,
.expenseItem,
.activityItem,
.topProdItem,
.goalRow,
.oCard {
  height: auto;
  min-height: 0;
}

/* Dashboard card grid responsive */
@media (max-width: 767px) {
  .dashGrid4 {
    grid-template-columns: 1fr;
  }

  .dashSubGrid {
    grid-template-columns: 1fr;
  }

  .dashRow2 {
    grid-template-columns: 1fr;
  }

  .cleanGrid {
    grid-template-columns: 1fr;
  }

  /* Dash KPIs stacked */
  .dashKpis {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashKpis .kpiV2 {
    min-height: 0;
  }

  /* Dash hero */
  .dashHero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dashHeroTopRow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashHeroRight {
    width: 100%;
    align-items: flex-start;
    min-width: 0;
  }

  .dashPills,
  .dashActions,
  .dashQuickActions {
    justify-content: flex-start;
    width: 100%;
    flex-wrap: wrap;
  }

  .dashActions.compact {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dashActions.compact::-webkit-scrollbar {
    display: none;
  }

  /* Command grid */
  .commandGrid {
    grid-template-columns: 1fr;
  }

  /* Performance stats */
  .dashPerfStatsGrid {
    grid-template-columns: 1fr;
  }

  .dashExecutiveGrid {
    grid-template-columns: 1fr;
  }

  .dashPulseStats {
    grid-template-columns: 1fr;
  }

  .dashSupportGrid {
    grid-template-columns: 1fr;
  }

  .dashSupportStats {
    grid-template-columns: 1fr;
  }

  .dashAttentionStrip {
    grid-template-columns: 1fr;
  }

  .dashInsightsRow {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   ORDER CARDS (oCard) — Mobile refinement
   ===================================================================== */
@media (max-width: 429px) {
  .oMoney {
    grid-template-columns: 1fr;
  }

  .oCard {
    padding: 10px;
    border-radius: 16px;
  }

  .oName {
    font-size: 13px;
  }

  .oActions {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .oActions .btn {
    flex: 1 1 auto;
  }
}


/* =====================================================================
   EXPENSE MODULE RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .expenseHeroHead {
    padding: 14px;
  }

  .expenseHeroRight {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .expenseHeroRight .search {
    width: 100%;
  }

  .expenseControlRow {
    flex-wrap: wrap;
    gap: 8px;
  }

  .expenseControlField {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .expenseToggle {
    width: 100%;
    justify-content: flex-start;
  }

  .expenseCardGrid {
    grid-template-columns: 1fr;
  }

  .expenseMetricGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expenseItemTop,
  .expenseFoot {
    flex-direction: column;
    align-items: flex-start;
  }

  .expenseItemTotal,
  .expenseActions {
    width: 100%;
  }
}

@media (max-width: 429px) {
  .expenseMetricGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   INVENTORY / STOKU RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .inventoryHero {
    gap: 12px;
  }

  .inventoryHeroTools {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .inventoryHeroSearch {
    width: 100%;
  }

  .inventoryToolbarGrid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .inventoryToolbarZone {
    width: 100%;
  }

  .inventorySegmented,
  .inventoryControlChips {
    gap: 6px;
  }

  .inventoryUtilityBar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .inventoryBufferField {
    flex: 1 1 100%;
  }

  .invSummary,
  .inventoryOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Product mode guide */
  .productModeGuide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 429px) {

  .invSummary,
  .inventoryOverviewGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   SUBSCRIPTION / ABONIME RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .subsHeroSearch {
    width: 100%;
    min-width: 0;
  }

  .subsHeroSearch .search {
    width: 100%;
  }

  .subsOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subsQueuePanel .productPanelHead {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 429px) {
  .subsOverviewGrid {
    grid-template-columns: 1fr;
  }

  .subsKpiGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   REPORTS RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .reportsShell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .kpiGrid4 {
    grid-template-columns: 1fr;
  }

  .kpiTopRow {
    grid-template-columns: 1fr;
  }

  .kpiBigRow {
    flex-direction: column;
  }

  .kpiSmallGrid,
  .kpiMiniGrid,
  .kpiCardGrid {
    grid-template-columns: 1fr;
  }

  .reportsHead {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .reportsHeadActions {
    width: 100%;
  }

  .reportsHeadActions .btn {
    flex: 1 1 auto;
  }
}


/* =====================================================================
   SETTINGS & BUSINESS PROFILE RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {

  /* Settings layout single col */
  .settingsLayout,
  .businessProfileLayout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Security overview */
  .settingsSecurityOverview {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .settingsSecurityBlocks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Preview surface compact */
  .settingsPreviewSurface {
    padding: 10px;
  }

  /* Business profile */
  .businessProfileActionBar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .businessProfileActionButtons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .businessPreviewGrid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .businessLogoControlGrid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Product entry action bar */
  .productEntryActionBar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .productEntryActionButtons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .productEntryActionButtons .btn {
    width: 100%;
  }

  /* Backup panel single col */
  #view-backupData .productLayout {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   TRASH MODULE RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .trashHead {
    gap: 10px;
  }

  .trashHeadActions {
    width: 100%;
  }

  .trashSearchWrap {
    width: 100%;
  }

  .trashActionGroups {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .trashSafeActions,
  .trashDangerActions {
    width: 100%;
  }

  .trashSafeActions .btn,
  .trashDangerActions .btn {
    width: 100%;
  }

  .trashDangerActions {
    margin-left: 0;
  }
}


/* =====================================================================
   DIALOG / MODAL RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .dlgCard {
    width: min(96vw, 96vw);
    max-height: calc((var(--vvh, 1vh) * 100) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
    padding: 12px;
    border-radius: 16px;
  }

  .dlgBody {
    grid-template-columns: 1fr;
  }

  .dlgActions {
    flex-wrap: wrap;
  }

  .dlgActions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  #dlgPorosi .dlgCard {
    width: min(97vw, 97vw);
  }

  .orderEditShell {
    gap: 10px;
  }

  .orderEditSection {
    padding: 10px;
    border-radius: 14px;
  }

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

  /* Customer dialog */
  #dlgCustomer .kpiRow {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   CHART RESPONSIVENESS
   ===================================================================== */
.chartCanvas {
  max-width: 100%;
  width: 100%;
}

/* Prevent chart container overflow */
.kpiCard,
.dashCardV2,
.dashCard {
  overflow: hidden;
}


/* =====================================================================
   IPHONE SAFE AREA HANDLING
   ===================================================================== */
@supports(padding: max(0px)) {

  /* Ensure safe area coverage on iPhone with notch/dynamic island */
  @media (max-width: 980px) {
    .main {
      padding-left: max(12px, env(safe-area-inset-left));
      padding-right: max(12px, env(safe-area-inset-right));
    }

    /* Sticky form bars */
    #view-newOrder #orderForm>.row,
    #view-newCustomer #customerForm.customerFormV2>.row {
      bottom: max(8px, calc(var(--bottombarH) + env(safe-area-inset-bottom) + 8px));
    }

    /* Toasts */
    .toastWrap {
      top: max(10px, calc(env(safe-area-inset-top) + 10px));
      right: max(10px, calc(env(safe-area-inset-right) + 10px));
    }
  }
}


/* =====================================================================
   TOUCH USABILITY — Enhanced tap targets
   ===================================================================== */
@media (pointer: coarse) {

  /* Ensure minimum touch targets */
  .btn {
    min-height: 44px;
    padding: 11px 14px;
  }

  .btn.small,
  .btn.sm {
    min-height: 44px;
    padding: 10px 12px;
  }

  .chip {
    min-height: 44px;
    padding: 10px 12px;
  }

  .iconbtn {
    width: 44px;
    height: 44px;
  }

  .navItem {
    min-height: 44px;
    padding: 11px 12px;
  }

  .menuItem {
    min-height: 44px;
  }

  /* Toggle / checkbox touch area */
  .check,
  .checkLine {
    min-height: 44px;
    padding: 10px 12px;
  }

  .check input,
  .checkLine input {
    width: 20px;
    height: 20px;
  }

  /* Select / input touch area */
  .field input,
  .field select,
  .field textarea {
    min-height: 44px;
    padding: 10px 12px;
  }

  /* Segmented tab touch area */
  .seg {
    min-height: 40px;
    padding: 8px 12px;
  }

  /* Action tiles */
  .actionTile,
  .miniAction {
    min-height: 44px;
    padding: 10px 12px;
  }

  /* Lookup items */
  .lookupItem {
    min-height: 44px;
    padding: 12px 12px;
  }

  /* City items */
  .cityItem {
    min-height: 44px;
    padding: 12px 12px;
  }

  /* Menu items in action menus */
  .menu .menuItem {
    min-height: 44px;
  }

  /* Spacing between adjacent buttons */
  .headRight {
    gap: 8px;
  }

  .row {
    gap: 8px;
  }
}


/* =====================================================================
   FLUID TYPOGRAPHY — clamp()-based
   ===================================================================== */
@media (max-width: 767px) {
  h1 {
    font-size: clamp(16px, 4vw, 20px);
  }

  .sub {
    font-size: clamp(11px, 2.5vw, 13px);
  }

  .dashTitle {
    font-size: clamp(20px, 6vw, 28px);
  }

  .dashBig {
    font-size: clamp(22px, 6vw, 28px);
  }

  .dashSubLine {
    font-size: 11px;
  }

  .dashKicker {
    font-size: 10px;
  }

  /* KPI values */
  .kpiBigVal {
    font-size: clamp(15px, 4vw, 18px);
  }

  .kpiMiniVal {
    font-size: clamp(13px, 3vw, 16px);
  }

  /* Product hero */
  .productHeroIntro h1 {
    font-size: clamp(20px, 5vw, 28px);
  }

  /* Module hero h1 */
  .moduleProLayout>.moduleHeroHead .productHeroIntro h1 {
    font-size: clamp(22px, 5vw, 30px);
  }

  /* Reduce label noise */
  .field label {
    font-size: 11px;
  }
}


/* =====================================================================
   LIGHT THEME RESPONSIVE — Ensure overrides work in light mode too
   ===================================================================== */
@media (max-width: 980px) {
  html[data-theme="light"] .topbar {
    background: rgba(245, 247, 251, .82);
    color: var(--text);
  }

  html[data-theme="light"] .topTitle,
  html[data-theme="light"] .topSub {
    color: var(--text);
  }

  html[data-theme="light"] .mobileNav {
    background: rgba(245, 247, 251, .82);
  }

  html[data-theme="light"] .mnavItem {
    border-color: rgba(0, 0, 0, .10);
    background: rgba(255, 255, 255, .72);
    color: rgba(15, 20, 30, .82);
  }

  html[data-theme="light"] .mnavItem.active {
    border-color: rgba(254, 78, 14, .45);
    background: rgba(254, 78, 14, .12);
    color: rgba(15, 20, 30, .95);
  }

  html[data-theme="light"] .drawerBackdrop {
    background: rgba(0, 0, 0, .25);
  }

  html[data-theme="light"] .side {
    background:
      radial-gradient(circle at 18% 8%, rgba(254, 78, 14, .10), transparent 32%),
      radial-gradient(circle at 86% 10%, rgba(77, 124, 254, .08), transparent 30%),
      linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90));
    border-color: rgba(0, 0, 0, .08);
  }
}


/* =====================================================================
   INVOICE OVERLAY RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .invModal {
    width: min(98vw, 100%);
    border-radius: 14px;
  }

  .invFrame {
    height: 800px;
  }

  .invTop {
    flex-wrap: wrap;
    gap: 8px;
  }
}


/* =====================================================================
   AUTH PAGE RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .authPage {
    grid-template-columns: 1fr;
    height: auto;
    width: min(96vw, 96vw);
    border-radius: 20px;
  }

  .authRight {
    display: none;
  }

  .authLeft {
    padding: 20px 18px 18px;
    border-right: none;
  }

  .authTitle {
    font-size: 20px;
  }

  .authBrand {
    gap: 10px;
  }
}


/* =====================================================================
   SPECIFIC VIEW FIXES FOR MEDIUM SCREENS (834px iPad)
   ===================================================================== */
@media (min-width: 768px) and (max-width: 834px) {
  .productLayout {
    grid-template-columns: 1fr;
  }

  .businessPreviewGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   LANDSCAPE PHONE FIXES
   ===================================================================== */
@media (max-height: 500px) and (orientation: landscape) {

  /* Reduce hero sections in landscape to save vertical space */
  .productHeroHead {
    padding: 10px 14px;
  }

  .productHeroIntro {
    padding-top: 8px;
    gap: 4px;
  }

  .productHeroIntro h1 {
    font-size: 20px;
  }

  /* Dash hero compact */
  .dashHero,
  .dashCommandHero,
  .commandDash .dashHero {
    padding: 10px 14px;
  }

  /* Reduce KPI padding */
  .kpiV2 {
    padding: 10px;
    min-height: 0;
  }

  /* Bottom bar thinner */
  :root {
    --bottombarH: 54px;
    --topbarH: 48px;
  }
}


/* =====================================================================
   PRINT SAFETY — Don't break print
   ===================================================================== */
@media print {

  .topbar,
  .mobileNav,
  .drawerBackdrop,
  .fsFab,
  .side {
    display: none !important;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }

  .main {
    padding: 0;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}


/* =====================================================================
   PERFORMANCE — Reduce expensive effects on mobile
   ===================================================================== */
@media (max-width: 767px) {

  /* Reduce backdrop-filter intensity on phones for smoother scrolling */
  :root {
    --glassBlur: 8px;
  }

  /* Reduce box-shadows on mobile */
  .glass {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
  }

  /* Remove hover transforms on touch */
  @media (hover: none) {

    .moduleMotionSurface:hover,
    #view-expenses .expenseStatCard:hover,
    #view-expenses .expenseItem:hover,
    #view-products .invPill:hover,
    .activityItem:hover,
    .topProdItem:hover,
    .actionTile:hover,
    .miniAction:hover {
      transform: none;
    }
  }
}


/* =====================================================================
   SCROLLABLE PANELS — Prevent nested scroll issues
   ===================================================================== */
.dashScroll,
.subsQueueList,
.lookupResults,
.installmentCenterBody {
  overscroll-behavior: contain;
}

/* On mobile, limit feed heights to prevent endless scroll within scroll */
@media (max-width: 767px) {
  .dashScroll {
    max-height: 300px;
  }

  .subsQueueList {
    max-height: 400px;
    overflow-y: auto;
  }
}


/* =====================================================================
   PAYMENT HERO SPECIFIC FIX — Search/buttons collision
   ===================================================================== */
@media (max-width: 767px) {
  #view-payments .paymentsHeroRight {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #view-payments .paymentsHeroRight .search {
    width: 100%;
  }

  #view-payments .paymentsHeroRight .btn {
    width: 100%;
    text-align: center;
  }
}


/* =====================================================================
   CRM / KLIENTË FIX — Hero tools stacking
   ===================================================================== */
@media (max-width: 767px) {
  #view-customers .crmHero {
    align-items: flex-start;
    gap: 10px;
  }

  .crmHeroTools {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .crmHeroSearch {
    min-width: 0;
    width: 100%;
  }

  #view-customers .crmHero .headRight {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  #view-customers .crmHero .headRight .btn {
    width: 100%;
    text-align: center;
  }

  .crmOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 429px) {
  .crmOverviewGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   ORDERS HERO SPECIFIC — Ensure search/route don't collide
   ===================================================================== */
@media (max-width: 767px) {
  #view-orders .ordersHero {
    align-items: flex-start;
    gap: 10px;
  }

  #view-orders .ordersHeroRight {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ordersHeroField {
    width: 100%;
  }

  .ordersHeroField .search {
    width: 100%;
    min-width: 0;
  }

  .ordersRouteControls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #view-orders .ordersOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 389px) {
  #view-orders .ordersOverviewGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   NEW ORDER / FORM STICKY BAR — iPhone safe adjustment
   ===================================================================== */
@media (max-width: 980px) {
  #view-newOrder #orderForm>.row {
    bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 8px);
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 14px;
  }

  #view-newOrder #orderForm {
    padding-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 190px);
  }

  #view-newOrder #orderForm>.field:last-of-type {
    margin-bottom: 12px;
  }

  #view-newOrder #o_notes {
    min-height: 118px;
    line-height: 1.45;
    scroll-margin-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 220px);
  }

  #view-newCustomer #customerForm.customerFormV2>.row {
    bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 8px);
  }

  #view-newCustomer #customerForm {
    padding-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 190px);
  }

  #view-newCustomer #c_notes {
    scroll-margin-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 220px);
  }

  /* Debt/Payment/Expense form action bars */
  .debtFormActionBar,
  .paymentFormActionBar {
    position: sticky;
    bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 8px);
    z-index: 8;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    background: rgba(8, 12, 20, .82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  #view-newDebt #debtForm {
    padding-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 190px);
  }

  #view-newDebt .debtQuickSummaryCard {
    scroll-margin-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 220px);
  }

  #view-newPayment #paymentForm {
    padding-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 180px);
  }

  #view-newPayment #p_note {
    scroll-margin-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 210px);
  }

  #view-newProduct #productForm {
    padding-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 190px);
  }

  #view-newProduct #productForm>.row {
    bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 8px);
  }

  #view-newProduct #productConfigSummary {
    scroll-margin-bottom: calc(var(--bottombarH) + env(safe-area-inset-bottom) + 220px);
  }
}


/* =====================================================================
   DEBT HERO SPECIFIC
   ===================================================================== */
@media (max-width: 767px) {
  #view-debts .debtHero {
    align-items: flex-start;
    gap: 10px;
  }

  .debtHeroTools {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .debtHeroSearch {
    width: 100%;
    min-width: 0;
  }

  .debtOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debtHeroMeta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 389px) {
  .debtOverviewGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   STOCK/KËRKESAT HERO
   ===================================================================== */
@media (max-width: 767px) {
  #view-stock .stockHero {
    align-items: flex-start;
    gap: 10px;
  }

  .stockHeroTools {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .stockOverviewGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stockHeroMeta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 389px) {
  .stockOverviewGrid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   INSTALLMENT CENTER RESPONSIVENESS
   ===================================================================== */
@media (max-width: 767px) {
  .installmentControlCenter .installmentCenterTopActions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .installmentCenterToolbar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .installmentCenterToolbar>* {
    flex: 1 1 auto;
    min-width: 0;
  }

  .installmentCenterKpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 429px) {
  .installmentCenterKpis {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   PRODUCT ENTRY (NEW PRODUCT) — Mode guide + form compact
   ===================================================================== */
@media (max-width: 767px) {
  .productModeGuide {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .productGuideCard {
    padding: 12px;
  }

  .newProductLayout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Product config summary grid */
  .productConfigSummaryGrid {
    grid-template-columns: 1fr;
  }

  .productBundleRow {
    flex-direction: column;
    align-items: stretch;
  }

  .productBundleQty {
    width: 100%;
  }

  /* Product entry hero */
  .newProductHead {
    padding: 14px;
  }
}


/* =====================================================================
   BACKUP & DATA VIEW
   ===================================================================== */
@media (max-width: 767px) {
  #view-backupData .productLayout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}


/* =====================================================================
   WIDE SCREEN ENHANCEMENT (1728 / 1920)
   Give more breathing room, keep content readable
   ===================================================================== */
@media (min-width: 1728px) {
  .shell {
    max-width: 1860px;
    padding: 22px;
    gap: 20px;
  }

  .main {
    gap: 18px;
  }

  .card {
    padding: 18px;
  }

  .productLayout {
    gap: 16px;
  }

  .dashCommandHero,
  .commandDash .dashHero {
    padding: 24px;
    border-radius: 24px;
  }

  .dashKpis {
    gap: 16px;
  }

  /* KPI cards can be a bit more luxurious */
  .kpiV2 {
    padding: 16px;
    border-radius: 20px;
  }
}


/* =====================================================================
   FINAL MOBILE POLISH
   - Auth gate isolation
   - Stronger drawer surfaces
   - Toast placement above mobile navigation
   ===================================================================== */
.toastHost {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.toastHostMobile {
  left: 12px;
  right: 12px;
  bottom: calc(var(--bottombarH, 0px) + 46px + env(safe-area-inset-bottom) + var(--vvBottom, 0px));
  align-items: stretch;
}

body.authGateOpen {
  overflow: hidden;
}

body.authGateOpen .shell {
  opacity: .18;
  pointer-events: none;
  user-select: none;
}

body.authGateOpen .topbar,
body.authGateOpen .mobileNav,
body.authGateOpen .fsFab {
  opacity: 0;
  pointer-events: none;
}

.authPage {
  background:
    radial-gradient(120% 120% at 14% 0%, rgba(254, 78, 14, .16), rgba(254, 78, 14, 0) 42%),
    radial-gradient(120% 120% at 86% 12%, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, rgba(11, 18, 32, .96), rgba(8, 12, 20, .94));
}

.authLeft {
  background: linear-gradient(180deg, rgba(10, 12, 18, .90), rgba(10, 12, 18, .84));
}

@media (max-width: 980px) {
  .drawerBackdrop {
    background: rgba(3, 8, 16, .68);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .side {
    border-color: rgba(255, 255, 255, .10);
    background:
      radial-gradient(circle at 16% 8%, rgba(254, 78, 14, .14), transparent 28%),
      radial-gradient(circle at 88% 12%, rgba(77, 124, 254, .08), transparent 24%),
      linear-gradient(180deg, rgba(11, 18, 32, .97), rgba(8, 12, 20, .95));
    box-shadow: 0 26px 80px rgba(0, 0, 0, .52);
  }

  .topbar {
    background: rgba(10, 14, 22, .84);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
  }

  .mobileNav {
    background: rgba(10, 14, 22, .86);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
  }

  .authGate {
    padding:
      calc(env(safe-area-inset-top) + 10px) calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
    background:
      radial-gradient(900px 520px at 16% 10%, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0) 56%),
      radial-gradient(980px 620px at 82% 18%, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 58%),
      rgba(3, 8, 16, .86);
  }

  .authPage {
    width: min(560px, calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 8px));
    min-height: min(720px, calc((var(--vvh, 1vh) * 100) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px));
    border-radius: 24px;
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 28px 86px rgba(0, 0, 0, .56);
  }

  .authLeft {
    padding: 20px 18px 18px;
    background: linear-gradient(180deg, rgba(10, 12, 18, .96), rgba(10, 12, 18, .90));
    border-right: none;
  }

  .authTabs {
    margin-bottom: 14px;
  }

  .authLinks {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .authInstallHint {
    margin-top: 12px;
    padding: 11px 12px;
  }

  .authForm .field {
    margin-bottom: 10px;
  }

  .authRow {
    flex-direction: column;
    align-items: stretch;
  }

  .authRow .btn {
    width: 100%;
  }

  .authLangSel {
    width: 100%;
    max-width: 152px;
    margin-left: auto;
    background: rgba(255, 255, 255, .08);
  }
}

@media (max-width: 520px) {
  .authGate {
    padding:
      calc(env(safe-area-inset-top) + 8px) calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  }

  .authPage {
    width: 100%;
    border-radius: 20px;
  }

  .authBrand {
    margin-bottom: 10px;
  }

  .authTabs {
    gap: 8px;
  }
}

@media (max-width: 767px) {

  #view-newDebt .financeNewLayout,
  #view-newPayment .financeNewLayout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

html[data-theme="light"] .authPage {
  background:
    radial-gradient(120% 120% at 14% 0%, rgba(254, 78, 14, .12), rgba(254, 78, 14, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(244, 247, 251, .96));
}

html[data-theme="light"] .authLeft {
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 253, .92));
}

@media (max-width: 980px) {
  html[data-theme="light"] .side {
    background:
      radial-gradient(circle at 16% 8%, rgba(254, 78, 14, .12), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 248, 252, .96));
    box-shadow: 0 24px 72px rgba(11, 18, 32, .18);
  }

  html[data-theme="light"] .drawerBackdrop {
    background: rgba(15, 20, 30, .22);
  }

  html[data-theme="light"] .topbar {
    background: rgba(245, 247, 251, .90);
  }

  html[data-theme="light"] .mobileNav {
    background: rgba(245, 247, 251, .92);
  }

  html[data-theme="light"] .authGate {
    background:
      radial-gradient(900px 520px at 16% 10%, rgba(254, 78, 14, .12), rgba(254, 78, 14, 0) 56%),
      rgba(16, 22, 34, .28);
  }
}

/* =====================================================================
   GREEN FLAT THEME SYSTEM
   Sportsbook-inspired utility look:
   - green brand bars
   - flat charcoal surfaces
   - yellow/gold key highlights
   - reduced blur, glow and luxury treatment
   ===================================================================== */

.settingsPreviewSurface[data-preview-theme="green-flat"] {
  border-color: rgba(26, 107, 60, .34);
  background:
    linear-gradient(180deg, rgba(34, 40, 35, .98), rgba(28, 32, 28, .98)),
    radial-gradient(circle at top right, rgba(26, 107, 60, .18), transparent 42%);
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewSidebar {
  border-color: rgba(245, 197, 24, .18);
  background: linear-gradient(180deg, rgba(10, 92, 47, .98), rgba(16, 76, 43, .98));
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewSidebarLogo {
  border-color: rgba(245, 197, 24, .24);
  color: #f5c518;
  background: linear-gradient(180deg, rgba(18, 65, 33, .98), rgba(10, 49, 25, .98));
  box-shadow: none;
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewSidebarLabel,
.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewCardLabel {
  color: rgba(245, 197, 24, .76);
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewSidebarTitle,
.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewCardTitle {
  color: rgba(245, 247, 241, .96);
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewSidebarMeta,
.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewCardMeta {
  color: rgba(222, 230, 219, .68);
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewCard {
  border-color: rgba(75, 82, 74, .9);
  background: linear-gradient(180deg, rgba(50, 56, 50, .98), rgba(42, 47, 42, .98));
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewChip {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(241, 245, 239, .78);
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewChipAccent {
  border-color: rgba(245, 197, 24, .30);
  background: rgba(245, 197, 24, .12);
  color: #f5c518;
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewActions .btn {
  border-radius: 10px;
  box-shadow: none;
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewActions .btn.primary,
.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewActions .btn.small:not(.ghost) {
  border-color: rgba(245, 197, 24, .30);
  background: linear-gradient(180deg, rgba(26, 107, 60, .98), rgba(10, 92, 47, .98));
  color: #fff;
}

.settingsPreviewSurface[data-preview-theme="green-flat"] .settingsPreviewActions .btn.ghost {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(241, 245, 239, .86);
}

html[data-theme="green-flat"] {
  --bg: #262c26;
  --accent: #1a6b3c;
  --card: #313731;
  --stroke: #4a504a;
  --line: #4a504a;
  --text: rgba(245, 247, 241, .95);
  --muted: rgba(223, 230, 219, .66);
  --danger: #f87171;
  --good: #2dd47c;
  --warn: #f5c518;
  --shadow: 0 0 0 rgba(0, 0, 0, 0);
  --glassBlur: 0px;
  --r: 12px;
  --r2: 10px;
  --scroll-track: #212621;
  --scroll-thumb: rgba(245, 197, 24, .48);
  --scroll-thumb-strong: rgba(245, 197, 24, .82);
  --scroll-thumb-edge: #1b201b;
  --greenFlatBrand: #0a5c2f;
  --greenFlatBrandStrong: #1a6b3c;
  --greenFlatSurface: #313731;
  --greenFlatSurfaceSoft: #383f38;
  --greenFlatSurfaceAlt: #252b25;
  --greenFlatLine: #4a504a;
  --greenFlatValue: #f5c518;
  --greenFlatValueSoft: #ffe27b;
}

html[data-theme="green-flat"] body {
  color: var(--text);
  background: linear-gradient(180deg, #282d28, #232723);
}

html[data-theme="green-flat"] .glass {
  background: var(--card);
  border-color: var(--greenFlatLine);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 12px;
}

html[data-theme="green-flat"] .side {
  background: linear-gradient(180deg, rgba(28, 33, 28, .98), rgba(24, 29, 24, .98));
  border-color: rgba(74, 80, 74, .95);
  box-shadow: none;
}

html[data-theme="green-flat"] .brand {
  border-color: rgba(245, 197, 24, .18);
  background: linear-gradient(180deg, rgba(10, 92, 47, .98), rgba(16, 76, 43, .98));
}

html[data-theme="green-flat"] .logoAura {
  opacity: 0;
}

html[data-theme="green-flat"] .logoPlate {
  border-color: rgba(245, 197, 24, .18);
  background: linear-gradient(180deg, rgba(18, 65, 33, .98), rgba(10, 49, 25, .98));
  box-shadow: none;
}

html[data-theme="green-flat"] .logoAccent {
  background: linear-gradient(90deg, rgba(255, 235, 167, .98), rgba(245, 197, 24, .95));
  box-shadow: none;
}

html[data-theme="green-flat"] .logoGlyph {
  color: #f5c518;
  text-shadow: none;
}

html[data-theme="green-flat"] .logoScan {
  background:
    radial-gradient(circle at 6px 4px, rgba(255, 240, 190, .98) 0 2px, transparent 2.4px),
    linear-gradient(90deg,
      rgba(245, 197, 24, .92) 0%,
      rgba(245, 197, 24, .92) 22%,
      transparent 22%,
      transparent 31%,
      rgba(245, 197, 24, .92) 31%,
      rgba(245, 197, 24, .92) 50%,
      transparent 50%,
      transparent 57%,
      rgba(255, 235, 167, .96) 57%,
      rgba(255, 235, 167, .96) 84%,
      rgba(255, 255, 255, .92) 84%,
      rgba(255, 255, 255, .92) 100%);
}

html[data-theme="green-flat"] .brandOwnerDot {
  background: linear-gradient(180deg, rgba(255, 234, 160, .96), rgba(245, 197, 24, .95));
  box-shadow: none;
}

html[data-theme="green-flat"] .navSep {
  background: rgba(255, 255, 255, .06);
}

html[data-theme="green-flat"] .navItem {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(45, 51, 45, .98), rgba(39, 44, 39, .98));
  border-radius: 10px;
  box-shadow: none;
}

html[data-theme="green-flat"] .navItem .dot {
  background: rgba(245, 197, 24, .86);
}

html[data-theme="green-flat"] .navItem.active {
  border-color: rgba(245, 197, 24, .34);
  background: linear-gradient(180deg, rgba(26, 107, 60, .92), rgba(16, 76, 43, .92));
  box-shadow: none;
}

html[data-theme="green-flat"] .count {
  border-color: rgba(245, 197, 24, .18);
  background: rgba(245, 197, 24, .08);
  color: #f5c518;
}

html[data-theme="green-flat"] .sideHint {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(41, 47, 41, .98), rgba(34, 39, 34, .98));
}

html[data-theme="green-flat"] .btn {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(47, 53, 47, .98), rgba(39, 44, 39, .98));
  color: var(--text);
  border-radius: 10px;
  box-shadow: none;
}

html[data-theme="green-flat"] .btn:hover {
  border-color: rgba(245, 197, 24, .18);
  background: linear-gradient(180deg, rgba(54, 61, 54, .98), rgba(43, 49, 43, .98));
}

html[data-theme="green-flat"] .btn.primary {
  border-color: rgba(245, 197, 24, .26);
  background: linear-gradient(180deg, rgba(26, 107, 60, .98), rgba(10, 92, 47, .98));
  color: #fff;
  box-shadow: none;
}

html[data-theme="green-flat"] .btn.primary:hover {
  background: linear-gradient(180deg, rgba(31, 122, 69, .98), rgba(13, 102, 52, .98));
}

html[data-theme="green-flat"] .btn.ghost {
  background: rgba(255, 255, 255, .04);
}

html[data-theme="green-flat"] .search,
html[data-theme="green-flat"] .field input,
html[data-theme="green-flat"] .field select,
html[data-theme="green-flat"] .field textarea,
html[data-theme="green-flat"] .check,
html[data-theme="green-flat"] .iconbtn,
html[data-theme="green-flat"] .cityList,
html[data-theme="green-flat"] .sideHint {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(35, 40, 35, .98), rgba(29, 34, 29, .98));
  color: var(--text);
  box-shadow: none;
}

html[data-theme="green-flat"] .field select option {
  background: #252a25;
  color: var(--text);
}

html[data-theme="green-flat"] .field select:disabled {
  border-color: rgba(245, 197, 24, .22);
  background: linear-gradient(180deg, rgba(28, 58, 39, .98), rgba(24, 48, 34, .98));
  color: rgba(255, 255, 255, .94);
  opacity: 1;
  cursor: not-allowed;
}

html[data-theme="green-flat"] .search:focus,
html[data-theme="green-flat"] .field input:focus,
html[data-theme="green-flat"] .field select:focus,
html[data-theme="green-flat"] .field textarea:focus {
  border-color: rgba(245, 197, 24, .52);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, .14);
}

html[data-theme="green-flat"] .check input {
  accent-color: #1a6b3c;
}

html[data-theme="green-flat"] .lookupPanel,
html[data-theme="green-flat"] .menu {
  border-color: rgba(74, 80, 74, .98);
  background: linear-gradient(180deg, rgba(36, 41, 36, .99), rgba(28, 33, 28, .99));
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-theme="green-flat"] .lookupPanelHead {
  border-bottom-color: rgba(74, 80, 74, .92);
  background: rgba(255, 255, 255, .03);
}

html[data-theme="green-flat"] .chip {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(45, 51, 45, .98), rgba(39, 44, 39, .98));
  color: rgba(228, 234, 225, .70);
  border-radius: 10px;
}

html[data-theme="green-flat"] .chip.active {
  border-color: rgba(245, 197, 24, .32);
  background: linear-gradient(180deg, rgba(26, 107, 60, .86), rgba(16, 76, 43, .86));
  color: rgba(255, 255, 255, .96);
}

html[data-theme="green-flat"] .tableWrap,
html[data-theme="green-flat"] .panel,
html[data-theme="green-flat"] .productPanel,
html[data-theme="green-flat"] .moduleTableSurface,
html[data-theme="green-flat"] .moduleProLayout>.moduleHeroHead,
html[data-theme="green-flat"] .productHeroHead,
html[data-theme="green-flat"] .dashCommandHero,
html[data-theme="green-flat"] .commandDash .dashHero,
html[data-theme="green-flat"] .dashCard,
html[data-theme="green-flat"] .dashMini,
html[data-theme="green-flat"] .kpiCard,
html[data-theme="green-flat"] .kpiMini,
html[data-theme="green-flat"] .inventoryKpiCard,
html[data-theme="green-flat"] .stockKpiCard,
html[data-theme="green-flat"] .debtKpiCard,
html[data-theme="green-flat"] .expenseStatCard,
html[data-theme="green-flat"] .stockCard,
html[data-theme="green-flat"] .debtCard,
html[data-theme="green-flat"] .inventoryCard,
html[data-theme="green-flat"] .expenseItem,
html[data-theme="green-flat"] .expenseBoardMonthCard,
html[data-theme="green-flat"] .backupOverviewCard,
html[data-theme="green-flat"] .backupDiagCard,
html[data-theme="green-flat"] .backupTrustCard,
html[data-theme="green-flat"] .backupReportShell,
html[data-theme="green-flat"] .backupDangerPanel,
html[data-theme="green-flat"] .settingsSecurityCard,
html[data-theme="green-flat"] .settingsSecurityPrimary,
html[data-theme="green-flat"] .settingsSecurityBlock,
html[data-theme="green-flat"] .settingsUtilityCard,
html[data-theme="green-flat"] .settingsActionBar,
html[data-theme="green-flat"] .settingsAdvancedIntro,
html[data-theme="green-flat"] .businessPreviewCard,
html[data-theme="green-flat"] .reportsExecCard,
html[data-theme="green-flat"] .reportsDataCard,
html[data-theme="green-flat"] .reportsRiskCard,
html[data-theme="green-flat"] .trashCard,
html[data-theme="green-flat"] .trashSummaryCard,
html[data-theme="green-flat"] .oCard,
html[data-theme="green-flat"] .paymentCard,
html[data-theme="green-flat"] .subsCard,
html[data-theme="green-flat"] .subsQueueCard,
html[data-theme="green-flat"] .dlgCard,
html[data-theme="green-flat"] .customerCard {
  border-color: rgba(74, 80, 74, .95) !important;
  background: linear-gradient(180deg, rgba(49, 55, 49, .98), rgba(41, 47, 41, .98)) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: 12px !important;
}

html[data-theme="green-flat"] .productHeroHead::before,
html[data-theme="green-flat"] .moduleHeroHead::before {
  background: linear-gradient(90deg, rgba(245, 197, 24, .98), rgba(26, 107, 60, .92));
  box-shadow: none;
}

html[data-theme="green-flat"] .productHeroEyebrow,
html[data-theme="green-flat"] [class*="Eyebrow"] {
  color: rgba(245, 197, 24, .78) !important;
}

html[data-theme="green-flat"] [class*="HeroPill"],
html[data-theme="green-flat"] .settingsUsageBadge,
html[data-theme="green-flat"] .settingsPreviewChip {
  border-color: rgba(255, 255, 255, .08) !important;
  background: rgba(255, 255, 255, .04) !important;
  color: rgba(241, 245, 239, .76) !important;
  box-shadow: none !important;
}

html[data-theme="green-flat"] [class*="HeroPill"] b,
html[data-theme="green-flat"] .settingsUsageBadge b,
html[data-theme="green-flat"] .settingsPreviewChipAccent {
  color: #f5c518 !important;
}

html[data-theme="green-flat"] .dashBig,
html[data-theme="green-flat"] .kpiCard b,
html[data-theme="green-flat"] .kpiMini b,
html[data-theme="green-flat"] .inventoryKpiValue,
html[data-theme="green-flat"] .expenseStatCard strong,
html[data-theme="green-flat"] .debtMoney,
html[data-theme="green-flat"] .stockPrice,
html[data-theme="green-flat"] .paymentSummaryItem b,
html[data-theme="green-flat"] .debtSummaryItem b,
html[data-theme="green-flat"] .inventoryMoneyCell strong,
html[data-theme="green-flat"] .inventorySuggestedCell strong,
html[data-theme="green-flat"] .reportsExecValue,
html[data-theme="green-flat"] .reportStatValue,
html[data-theme="green-flat"] .reportsRiskValue {
  color: #f5c518 !important;
}

html[data-theme="green-flat"] .table th {
  color: rgba(245, 247, 241, .70);
  border-bottom-color: rgba(74, 80, 74, .95);
  background: rgba(10, 92, 47, .18);
}

html[data-theme="green-flat"] .table td {
  border-bottom-color: rgba(255, 255, 255, .05);
}

html[data-theme="green-flat"] .table tr:hover td {
  background: rgba(26, 107, 60, .08);
}

html[data-theme="green-flat"] .topbar,
html[data-theme="green-flat"] .mobileNav {
  border-color: rgba(245, 197, 24, .14);
  background: linear-gradient(180deg, rgba(10, 92, 47, .98), rgba(16, 76, 43, .98));
  box-shadow: none;
}

html[data-theme="green-flat"] .topTitle,
html[data-theme="green-flat"] .topSub,
html[data-theme="green-flat"] .mnavItem {
  color: rgba(247, 250, 245, .96);
}

html[data-theme="green-flat"] .mnavItem.active {
  color: #fff;
  background: rgba(245, 197, 24, .12);
}

html[data-theme="green-flat"] .topbar .iconbtn,
html[data-theme="green-flat"] .mobileNav .iconbtn {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(9, 45, 24, .42);
  color: #fff;
}

html[data-theme="green-flat"] .drawerBackdrop {
  background: rgba(6, 11, 7, .56);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

html[data-theme="green-flat"] .authGate {
  background:
    linear-gradient(180deg, rgba(5, 12, 7, .76), rgba(5, 12, 7, .76)),
    radial-gradient(900px 520px at 16% 10%, rgba(26, 107, 60, .16), rgba(26, 107, 60, 0) 56%);
  backdrop-filter: blur(8px);
}

html[data-theme="green-flat"] .authPage {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(31, 37, 31, .98), rgba(23, 28, 23, .98));
  box-shadow: none;
}

html[data-theme="green-flat"] .authLeft {
  border-right-color: rgba(245, 197, 24, .12);
  background: linear-gradient(180deg, rgba(10, 92, 47, .98), rgba(16, 76, 43, .94));
}

html[data-theme="green-flat"] .authLangSel {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(9, 45, 24, .36);
  color: #fff;
}

html[data-theme="green-flat"] .authGate .btn.primary {
  border-color: rgba(245, 197, 24, .26);
  background: linear-gradient(180deg, rgba(26, 107, 60, .98), rgba(10, 92, 47, .98));
}

/* Green Flat dashboard + accent polish */
html[data-theme="green-flat"] .dashHero,
html[data-theme="green-flat"] .commandDash .dashHero {
  border-color: rgba(74, 80, 74, .95) !important;
  background:
    radial-gradient(900px 320px at 12% 12%, rgba(26, 107, 60, .18), rgba(26, 107, 60, 0) 58%),
    radial-gradient(820px 280px at 88% 12%, rgba(245, 197, 24, .08), rgba(245, 197, 24, 0) 56%),
    linear-gradient(180deg, rgba(51, 57, 51, .98), rgba(41, 47, 41, .98)) !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

html[data-theme="green-flat"] .dashHero:before {
  background: radial-gradient(circle at 32% 32%, rgba(245, 197, 24, .18), rgba(26, 107, 60, .10), transparent 66%) !important;
  opacity: .88 !important;
}

html[data-theme="green-flat"] .dashKicker {
  color: rgba(245, 197, 24, .76) !important;
}

html[data-theme="green-flat"] .dashTitle .brandMark {
  color: #f5c518 !important;
  text-shadow: none !important;
}

html[data-theme="green-flat"] .dashTitle .brandX {
  color: rgba(248, 250, 245, .94) !important;
  text-shadow: none !important;
}

html[data-theme="green-flat"] .dashSubLine {
  color: rgba(232, 237, 229, .72) !important;
}

html[data-theme="green-flat"] .dashSubLine b {
  color: rgba(248, 250, 245, .96) !important;
}

html[data-theme="green-flat"] .pill {
  border-color: rgba(74, 80, 74, .95);
  background: rgba(24, 29, 24, .68);
  color: rgba(235, 239, 232, .84);
}

html[data-theme="green-flat"] .pill.accent {
  border-color: rgba(245, 197, 24, .30);
  background: linear-gradient(180deg, rgba(26, 107, 60, .82), rgba(16, 76, 43, .82));
  color: rgba(255, 255, 255, .96);
}

html[data-theme="green-flat"] .actionTile,
html[data-theme="green-flat"] .miniAction {
  border-color: rgba(74, 80, 74, .95);
  background: rgba(24, 29, 24, .70);
  color: rgba(245, 247, 242, .94);
  box-shadow: none;
}

html[data-theme="green-flat"] .actionTile:hover,
html[data-theme="green-flat"] .miniAction:hover {
  background: rgba(32, 38, 32, .92);
}

html[data-theme="green-flat"] .actionTile.primary,
html[data-theme="green-flat"] .miniAction.primary {
  border-color: rgba(245, 197, 24, .28);
  background: linear-gradient(180deg, rgba(26, 107, 60, .92), rgba(16, 76, 43, .92));
  color: #fff;
}

html[data-theme="green-flat"] .segTabs {
  border-color: rgba(74, 80, 74, .95);
  background: rgba(24, 29, 24, .78);
}

html[data-theme="green-flat"] .seg.on {
  border-color: rgba(245, 197, 24, .28);
  background: linear-gradient(180deg, rgba(26, 107, 60, .86), rgba(16, 76, 43, .86));
  color: rgba(255, 255, 255, .96);
}

html[data-theme="green-flat"] .kpiV2 {
  border-color: rgba(74, 80, 74, .95) !important;
  background: linear-gradient(180deg, rgba(49, 55, 49, .98), rgba(41, 47, 41, .98)) !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}

html[data-theme="green-flat"] .kpiV2:before {
  background: radial-gradient(circle at 30% 30%, rgba(26, 107, 60, .18), transparent 72%) !important;
  opacity: .52 !important;
}

html[data-theme="green-flat"] .kpiV2.kpiStock:before {
  background: radial-gradient(circle at 30% 30%, rgba(245, 197, 24, .12), rgba(26, 107, 60, .14), transparent 72%) !important;
}

html[data-theme="green-flat"] .kpiIcon {
  background: rgba(26, 107, 60, .16) !important;
  border-color: rgba(245, 197, 24, .18) !important;
  color: rgba(255, 255, 255, .94) !important;
}

html[data-theme="green-flat"] .kpiStock .kpiIcon {
  background: rgba(16, 76, 43, .22) !important;
  border-color: rgba(245, 197, 24, .18) !important;
}

html[data-theme="green-flat"] .kpiHint,
html[data-theme="green-flat"] .kpiStat span {
  color: rgba(221, 227, 217, .66) !important;
}

html[data-theme="green-flat"] .kpiStat {
  border-color: rgba(74, 80, 74, .95) !important;
  background: rgba(22, 27, 22, .58) !important;
}

html[data-theme="green-flat"] .badge.accent,
html[data-theme="green-flat"] .badge.warnBadge {
  border-color: #f5c518 !important;
  background: #f5c518 !important;
  color: #1a1a1a !important;
}

html[data-theme="green-flat"] .bucketBar i,
html[data-theme="green-flat"] .topProdBar i {
  background: linear-gradient(90deg, rgba(26, 107, 60, .96), rgba(245, 197, 24, .88)) !important;
}

html[data-theme="green-flat"] .goalBar i {
  background: linear-gradient(90deg, rgba(26, 107, 60, .96), rgba(245, 197, 24, .86), rgba(242, 245, 240, .42)) !important;
}

/* Green Flat — Order cards gold value */
html[data-theme="green-flat"] .oCard .oMoney b,
html[data-theme="green-flat"] .oCard .oTotal,
html[data-theme="green-flat"] .paymentCard .paymentAmount,
html[data-theme="green-flat"] .customerCard .customerBalance {
  color: #f5c518 !important;
}

html[data-theme="green-flat"] .oCard .oActions .btn {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(39, 44, 39, .98), rgba(33, 38, 33, .98));
}

html[data-theme="green-flat"] .oCard .oActions .btn:hover {
  border-color: rgba(245, 197, 24, .18);
  background: linear-gradient(180deg, rgba(46, 52, 46, .98), rgba(39, 44, 39, .98));
}

html[data-theme="green-flat"] .oCard .oActions .btn.primary {
  border-color: rgba(245, 197, 24, .26);
  background: linear-gradient(180deg, rgba(26, 107, 60, .94), rgba(16, 76, 43, .94));
  color: #fff;
}

/* Green Flat — Dialogs */
html[data-theme="green-flat"] .dlgCard {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(42, 48, 42, .99), rgba(34, 39, 34, .99));
}

html[data-theme="green-flat"] .dlgHead {
  border-bottom-color: rgba(74, 80, 74, .92);
}

html[data-theme="green-flat"] .dlgBody .field input,
html[data-theme="green-flat"] .dlgBody .field select,
html[data-theme="green-flat"] .dlgBody .field textarea {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(30, 35, 30, .98), rgba(25, 30, 25, .98));
}

html[data-theme="green-flat"] dialog::backdrop {
  background: rgba(6, 11, 7, .62);
}

/* Green Flat — Toasts */
html[data-theme="green-flat"] .toast {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(36, 41, 36, .98), rgba(28, 33, 28, .98));
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
}

html[data-theme="green-flat"] .toast.success {
  border-color: rgba(26, 107, 60, .52);
}

html[data-theme="green-flat"] .toast.danger {
  border-color: rgba(248, 113, 113, .42);
}

html[data-theme="green-flat"] .toast.warning {
  border-color: rgba(245, 197, 24, .42);
}

/* Green Flat — Invoice overlay */
html[data-theme="green-flat"] .invoiceOverlay {
  background: rgba(6, 11, 7, .72);
}

html[data-theme="green-flat"] .invoicePaper {
  border-color: rgba(74, 80, 74, .95);
  background: linear-gradient(180deg, rgba(49, 55, 49, .99), rgba(41, 47, 41, .99));
  color: var(--text);
}

/* Green Flat — Mobile responsive */
@media (max-width: 980px) {
  html[data-theme="green-flat"] .drawerBackdrop {
    background: rgba(6, 11, 7, .58);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  html[data-theme="green-flat"] .side {
    border-color: rgba(245, 197, 24, .12);
    background:
      radial-gradient(circle at 16% 8%, rgba(26, 107, 60, .18), transparent 28%),
      linear-gradient(180deg, rgba(24, 29, 24, .98), rgba(20, 25, 20, .98));
    box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
  }

  html[data-theme="green-flat"] .topbar {
    border-color: rgba(245, 197, 24, .12);
    background: linear-gradient(180deg, rgba(10, 92, 47, .98), rgba(16, 76, 43, .98));
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  }

  html[data-theme="green-flat"] .mobileNav {
    border-color: rgba(245, 197, 24, .12);
    background: linear-gradient(180deg, rgba(10, 92, 47, .98), rgba(16, 76, 43, .98));
    box-shadow: 0 14px 32px rgba(0, 0, 0, .26);
  }

  html[data-theme="green-flat"] .mnavItem {
    color: rgba(247, 250, 245, .92);
  }

  html[data-theme="green-flat"] .mnavItem.active {
    color: #fff;
    background: rgba(245, 197, 24, .14);
    border-color: rgba(245, 197, 24, .24);
  }
}

/* Light theme stability polish */
html[data-theme="light"] .side {
  background:
    radial-gradient(circle at 18% 8%, rgba(254, 78, 14, .10), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(77, 124, 254, .08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(249, 250, 253, .94)) !important;
  box-shadow: 0 18px 42px rgba(15, 20, 30, .08);
}

html[data-theme="light"] .navItem,
html[data-theme="light"] .chip,
html[data-theme="light"] .search,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .check,
html[data-theme="light"] .panel,
html[data-theme="light"] .dashCard,
html[data-theme="light"] .dashMini,
html[data-theme="light"] .kpiCard,
html[data-theme="light"] .kpiMini,
html[data-theme="light"] .tableWrap,
html[data-theme="light"] .iconbtn,
html[data-theme="light"] .cityList,
html[data-theme="light"] .sideHint {
  background: rgba(255, 255, 255, .90) !important;
  border-color: rgba(15, 20, 30, .10) !important;
}

html[data-theme="light"] .navItem.active {
  /* Fallback for browsers without color-mix (iOS 15, older) */
  border-color: rgba(254, 78, 14, .34) !important;
  background: linear-gradient(180deg, rgba(254, 78, 14, .12), rgba(255, 255, 255, .98)) !important;
  box-shadow: 0 10px 24px rgba(254, 78, 14, .08);
}

@supports (color: color-mix(in srgb, red, blue)) {
  html[data-theme="light"] .navItem.active {
    border-color: color-mix(in srgb, var(--accent) 42%, rgba(15, 20, 30, .08)) !important;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, #fff 86%), rgba(255, 255, 255, .98)) !important;
  }
}

html[data-theme="light"] .navItem.active .dot {
  background: rgba(254, 78, 14, .82) !important;
}

@supports (color: color-mix(in srgb, red, blue)) {
  html[data-theme="light"] .navItem.active .dot {
    background: color-mix(in srgb, var(--accent) 72%, #000 0%) !important;
  }
}

html[data-theme="light"] .dashHero {
  border-color: rgba(11, 18, 32, .10);
  background:
    radial-gradient(840px 320px at 16% 18%, rgba(254, 78, 14, .12), rgba(254, 78, 14, 0) 58%),
    radial-gradient(780px 260px at 86% 14%, rgba(77, 124, 254, .09), rgba(77, 124, 254, 0) 56%),
    linear-gradient(180deg, rgba(255, 250, 247, .98), rgba(248, 250, 253, .98)) !important;
  box-shadow: 0 20px 42px rgba(15, 20, 30, .08);
}

html[data-theme="light"] .dashHero:before {
  background: radial-gradient(circle at 30% 30%, rgba(254, 78, 14, .18), rgba(254, 78, 14, 0) 68%);
  opacity: .55;
}

html[data-theme="light"] .dashTitle .brandMark {
  /* Fallback */
  color: rgba(254, 78, 14, .96);
  text-shadow: none;
}

@supports (color: color-mix(in srgb, red, blue)) {
  html[data-theme="light"] .dashTitle .brandMark {
    color: color-mix(in srgb, var(--accent) 94%, #fff 6%);
  }
}

html[data-theme="light"] .dashTitle .brandX {
  color: rgba(15, 20, 30, .96);
  text-shadow: none;
}

html[data-theme="light"] .productHeroHead,
html[data-theme="light"] .moduleProLayout>.moduleHeroHead,
html[data-theme="light"] .settingsHead {
  box-shadow: 0 18px 38px rgba(15, 20, 30, .08);
}

html[data-theme="light"] .productHeroIntro h1,
html[data-theme="light"] .moduleProLayout>.moduleHeroHead .productHeroIntro h1,
html[data-theme="light"] .settingsHead .productHeroIntro h1 {
  /* Fallback — uses default accent orange */
  background: linear-gradient(94deg, rgba(15, 20, 30, .98) 0%, rgba(42, 48, 63, .94) 58%, rgba(254, 78, 14, .88) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports (color: color-mix(in srgb, red, blue)) {

  html[data-theme="light"] .productHeroIntro h1,
  html[data-theme="light"] .moduleProLayout>.moduleHeroHead .productHeroIntro h1,
  html[data-theme="light"] .settingsHead .productHeroIntro h1 {
    background: linear-gradient(94deg, rgba(15, 20, 30, .98) 0%, rgba(42, 48, 63, .94) 58%, color-mix(in srgb, var(--accent) 84%, #fff 16%) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

html[data-theme="light"] .productHeroEyebrow {
  color: rgba(49, 57, 74, .66);
}

html[data-theme="light"] .productHeroIntro .sub {
  color: rgba(44, 51, 66, .76);
}

html[data-theme="light"] .actionTile,
html[data-theme="light"] .miniAction {
  border-color: rgba(15, 20, 30, .10);
  background: rgba(255, 255, 255, .94);
  color: rgba(15, 20, 30, .90);
}

html[data-theme="light"] .actionTile.primary,
html[data-theme="light"] .miniAction.primary {
  border-color: rgba(254, 78, 14, .34);
  background: linear-gradient(180deg, rgba(254, 78, 14, .16), rgba(255, 255, 255, .98));
  color: rgba(15, 20, 30, .95);
  box-shadow: 0 12px 28px rgba(254, 78, 14, .10);
}

html[data-theme="light"] .kpiV2,
html[data-theme="light"] .dashCardV2,
html[data-theme="light"] #view-orders .orderKpiCard,
html[data-theme="light"] #view-orders .ordersToolbarPanel,
html[data-theme="light"] #view-orders .ordersTableWrap {
  box-shadow: 0 14px 30px rgba(15, 20, 30, .06);
}

@media (max-width: 980px) {
  html[data-theme="light"] .topbar {
    border-color: rgba(15, 20, 30, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(246, 248, 251, .95));
    box-shadow: 0 14px 30px rgba(15, 20, 30, .10);
  }

  html[data-theme="light"] .mobileNav {
    border-color: rgba(15, 20, 30, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(246, 248, 251, .95));
    box-shadow: 0 18px 36px rgba(15, 20, 30, .12);
  }

  html[data-theme="light"] .mnavItem {
    border-color: rgba(15, 20, 30, .08);
    background: rgba(255, 255, 255, .94);
    color: rgba(15, 20, 30, .82);
  }

  html[data-theme="light"] .mnavItem.active {
    border-color: rgba(254, 78, 14, .34);
    background: linear-gradient(180deg, rgba(254, 78, 14, .17), rgba(255, 255, 255, .98));
    color: rgba(15, 20, 30, .95);
    box-shadow: inset 0 0 0 1px rgba(254, 78, 14, .06);
  }
}

/* ═══════════════════════════════════════════════════════════════
   OBSIDIAN GLASS 10/10 — Premium Motion & Polish System
   ═══════════════════════════════════════════════════════════════ */

/* ── Global: Inter font + Text Rendering ── */
:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
body, input, select, textarea, button {
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── 6 Premium @keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(254,78,14,.45); }
  50%      { box-shadow: 0 0 12px rgba(254,78,14,.80), 0 0 24px rgba(254,78,14,.25); }
}
@keyframes breathe {
  0%, 100% { opacity: .65; }
  50%      { opacity: 1; }
}

/* ── Global smooth transitions (16+ selectors) ── */
a, button, .btn, .chip, input, select, textarea,
.card, .badge, .nav-item, th, td, tr,
.search, label, .view {
  transition: all .18s cubic-bezier(.4,0,.2,1);
}

/* ── 8 Hover Patterns ── */

/* 1. Lift — cards, panels */
.stockOverviewGrid > div:hover,
.stockToolbarPanel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.22), 0 0 0 1px rgba(254,78,14,.08);
}

/* 2. Glow — primary buttons */
.btn.primary:hover {
  box-shadow: 0 0 18px rgba(254,78,14,.40), 0 6px 20px rgba(254,78,14,.18);
}

/* 3. Scale — action buttons */
.stockActionBtn:hover,
#view-stock .btn.ghost:hover {
  transform: scale(1.04);
}

/* 4. Press — chips/tabs */
#view-stock .chip:active,
.stockActionBtn:active {
  transform: scale(.96);
  transition-duration: .06s;
}

/* 5. Slide — table rows */
#view-stock tbody tr:hover {
  transform: translateX(3px);
}

/* 6. Pulse — urgent badge */
#view-stock .badge.danger {
  animation: breathe 2.4s ease-in-out infinite;
}

/* 7. Glow border — focused inputs */
#view-stock input:focus,
#view-stock select:focus {
  box-shadow: 0 0 0 3px rgba(254,78,14,.14), 0 0 12px rgba(254,78,14,.08);
  border-color: rgba(254,78,14,.50);
}

/* 8. Lift+glow — nav items */
nav .nav-item:hover,
.sidebar .nav-item:hover {
  transform: translateX(4px);
  text-shadow: 0 0 8px rgba(254,78,14,.20);
}

/* ── Pulsating Active Nav Dot ── */
nav .nav-item.active::before,
.sidebar .nav-item.active::before {
  animation: pulseGlow 2s ease-in-out infinite;
  border-radius: 50%;
}

/* ── Stock Hero: fadeInUp entry ── */
#view-stock .stockHero {
  animation: fadeInUp .5s cubic-bezier(.4,0,.2,1) both;
}

/* ── Stock KPI Cards: staggered scaleIn ── */
#view-stock .stockOverviewGrid > div:nth-child(1) { animation: scaleIn .4s cubic-bezier(.4,0,.2,1) .05s both; }
#view-stock .stockOverviewGrid > div:nth-child(2) { animation: scaleIn .4s cubic-bezier(.4,0,.2,1) .12s both; }
#view-stock .stockOverviewGrid > div:nth-child(3) { animation: scaleIn .4s cubic-bezier(.4,0,.2,1) .19s both; }
#view-stock .stockOverviewGrid > div:nth-child(4) { animation: scaleIn .4s cubic-bezier(.4,0,.2,1) .26s both; }

/* ── Stock Toolbar: slideInLeft entry ── */
#view-stock .stockToolbarPanel {
  animation: slideInLeft .45s cubic-bezier(.4,0,.2,1) .15s both;
}

/* ── Stock Table: fadeInUp entry ── */
#view-stock .stockDesktopTable {
  animation: fadeInUp .4s cubic-bezier(.4,0,.2,1) .25s both;
}

/* ── Stock Table Row Hover — premium ── */
#view-stock tbody tr {
  transition: transform .16s, background .16s, box-shadow .16s;
}
#view-stock tbody tr:hover {
  background: linear-gradient(90deg, rgba(254,78,14,.04), rgba(254,78,14,.015), transparent) !important;
  box-shadow: inset 3px 0 0 rgba(254,78,14,.60);
}

/* ── KPI card shimmer on hover ── */
#view-stock .stockOverviewGrid > div {
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
#view-stock .stockOverviewGrid > div::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.04) 45%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 55%, transparent 70%);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
#view-stock .stockOverviewGrid > div:hover::after {
  opacity: 1;
  animation: shimmer 1.6s ease-in-out;
}

/* ── Stock Action Buttons — micro polish ── */
.stockActionBtn {
  transition: transform .14s, background .14s, border-color .14s, color .14s, box-shadow .14s;
}
.stockActionBtn.accent:hover {
  box-shadow: 0 0 10px rgba(254,78,14,.25);
}
.stockActionBtn.danger:hover {
  box-shadow: 0 0 10px rgba(255,59,48,.20);
}

/* ── Stock Chips/Tabs — glow active ── */
#view-stock .chip.active {
  box-shadow: 0 0 10px rgba(254,78,14,.18), 0 2px 8px rgba(254,78,14,.12);
}

/* ── Empty State Bounce ── */
.stockEmptyState {
  animation: fadeInUp .5s cubic-bezier(.4,0,.2,1) .1s both;
}

/* ── Staggered Sidebar Nav Slide-in (12 items) ── */
nav > *:nth-child(1),  .sidebar > *:nth-child(1)  { animation: slideInLeft .3s ease .00s both; }
nav > *:nth-child(2),  .sidebar > *:nth-child(2)  { animation: slideInLeft .3s ease .03s both; }
nav > *:nth-child(3),  .sidebar > *:nth-child(3)  { animation: slideInLeft .3s ease .06s both; }
nav > *:nth-child(4),  .sidebar > *:nth-child(4)  { animation: slideInLeft .3s ease .09s both; }
nav > *:nth-child(5),  .sidebar > *:nth-child(5)  { animation: slideInLeft .3s ease .12s both; }
nav > *:nth-child(6),  .sidebar > *:nth-child(6)  { animation: slideInLeft .3s ease .15s both; }
nav > *:nth-child(7),  .sidebar > *:nth-child(7)  { animation: slideInLeft .3s ease .18s both; }
nav > *:nth-child(8),  .sidebar > *:nth-child(8)  { animation: slideInLeft .3s ease .21s both; }
nav > *:nth-child(9),  .sidebar > *:nth-child(9)  { animation: slideInLeft .3s ease .24s both; }
nav > *:nth-child(10), .sidebar > *:nth-child(10) { animation: slideInLeft .3s ease .27s both; }
nav > *:nth-child(11), .sidebar > *:nth-child(11) { animation: slideInLeft .3s ease .30s both; }
nav > *:nth-child(12), .sidebar > *:nth-child(12) { animation: slideInLeft .3s ease .33s both; }

/* ── View Transition: fade-in-up ── */
.view:not(.hidden) {
  animation: fadeInUp .35s cubic-bezier(.4,0,.2,1) both;
}

/* ── prefers-reduced-motion: Global Disable ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
