@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("./fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Bengali";
  src: url("./fonts/noto-sans-bengali.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --raised: #f3f5ee;
  --rule: #e5e9e1;
  --control-border: #becbbc;
  --positive: #376b48;
  --negative: #934a36;
  --ink: #192c38;
  --sub: #526573;
  --line: #dce2e6;
  --paper: #f5f6f8;
  --white: #fff;
  --green: #254d3e;
  --dark: #172b38;
  --mint: #e6edde;
  --gold: #a77931;
  --rust: #9d4b38;
  --accent: #a4471f;
  --accent-dark: #843717;
  --accent-ring: #de884f;
  --accent-soft: #faebe1;
  font-family: "Plus Jakarta Sans", "Noto Sans Bengali", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #938046;
}
svg {
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
}
a {
  color: var(--green);
}
.loading {
  margin: 2rem;
}
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--dark);
  color: white;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 30px 15px 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -1px;
  font-size: 25px;
}
.sidebar .brand {
  padding: 0 9px;
}
.mark {
  width: 32px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8894e;
  color: #172b38;
}
.nav {
  margin: 28px 0 12px;
  overflow-y: auto;
  min-height: 0;
  display: grid;
  gap: 4px;
}
.nav button {
  background: none;
  color: #ccd5db;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 540;
}
.nav button:hover,
.sidebar .quit:hover {
  background: #293f4c;
  color: white;
}
.nav button[aria-current="page"] {
  background: #344c5b;
  color: #f1f5e8;
  box-shadow: inset 3px 0 0 var(--accent-ring);
}
.sidebar-footer {
  margin-top: auto;
  padding: 14px 7px 4px;
  border-top: 1px solid #426152;
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  width: 33px;
  height: 33px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d9ddbf;
  color: #3a4a3a;
  font-weight: bold;
  font-size: 12px;
}
.who {
  min-width: 0;
  flex: 1;
}
.who strong,
.who small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who strong {
  font-size: 12px;
}
.who small {
  font-size: 11px;
  color: #bdcfc0;
  margin-top: 3px;
}
.quit {
  background: none;
  color: #c3d1c7;
  padding: 7px;
  border-radius: 4px;
}
.workspace {
  min-width: 0;
}
.topbar {
  padding: 14px clamp(20px, 4vw, 60px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  min-height: 67px;
}
.topbar .today {
  margin-left: auto;
  font-size: 12px;
  color: var(--sub);
  display: flex;
  gap: 7px;
  align-items: center;
}
.factory-select {
  max-width: min(52vw, 350px);
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  padding: 5px 20px 5px 0;
}
.factory-icon {
  color: var(--accent);
}
.menu-toggle {
  display: none;
}
.content {
  max-width: 1530px;
  margin: auto;
  padding: clamp(25px, 3.5vw, 50px) clamp(20px, 4vw, 60px) 60px;
}
.page-head,
.panel-head,
.actions,
.filters,
.form-actions,
.meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head,
.panel-head {
  justify-content: space-between;
  flex-wrap: wrap;
}
.page-head {
  margin: 0 0 25px;
}
.page-head h1,
.login h1 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -1.6px;
  font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1.09;
}
.page-head p,
.muted,
.help {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.55;
}
.page-head p {
  margin-top: 7px;
}
.btn,
.icon-btn,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
}
.btn,
.icon-btn {
  padding: 8px 13px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.icon-btn {
  padding: 8px;
}
.btn:hover,
.icon-btn:hover {
  border-color: #819484;
}
.btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn.primary:hover {
  background: var(--accent-dark);
}
.btn.danger,
.link-btn.danger {
  color: var(--rust);
}
.link-btn {
  background: none;
  color: var(--green);
  padding: 3px 0;
  min-height: 28px;
  text-align: left;
}
.link-btn:hover {
  text-decoration: underline;
}
.balance-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  background: #203847;
  color: white;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
}
.balance-main, .balance-side { padding: clamp(20px, 3vw, 36px); }
.balance-main { display: grid; align-content: center; gap: 10px; }
.balance-main span { display: flex; align-items: center; gap: 10px; }
.balance-main svg { color: #ffb382; }
.balance-main strong { font-size: clamp(32px, 4vw, 60px); letter-spacing: -.045em; }
.balance-main small, .balance-side span { color: #ccdae2; }
.balance-side { display: grid; gap: 14px; background: #192e3b; }
.balance-side > div { display: grid; gap: 4px; }
.balance-side > div + div { border-top: 1px solid #405561; padding-top: 12px; }
.balance-side strong { font-size: 22px; }
.balance-sheet strong { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.work-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.work-actions .btn { min-height: 54px; gap: 10px; border-radius: 10px; }
.work-actions svg, .btn.quick svg { color: var(--accent); }
@media (max-width: 600px) {
  .balance-sheet { grid-template-columns: 1fr; }
  .balance-side { grid-template-columns: 1fr 1fr; padding: 16px 20px; }
  .balance-side > div + div { border-top: 0; padding: 0 0 0 14px; border-left: 1px solid #405561; }
  .balance-side span { font-size: 12px; }
  .work-actions { gap: 6px; }
  .work-actions .btn { flex-direction: column; padding: 10px 5px; }
}
.work-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr); gap: 18px; align-items: start; }
.work-grid .panel { margin: 0; }
.work-grid > *, .work-side { min-width: 0; }
.work-side { display: grid; gap: 18px; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-row {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 12px; padding: 13px 18px; min-height: 58px;
  text-align: left; background: transparent; color: var(--ink);
}
.activity-row:focus-visible { outline-offset: -3px; }
.activity-row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.activity-list li + li, .account-row + .account-row { border-top: 1px solid var(--line); }
.activity-text { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.activity-text strong, .activity-amount { font-size: 14px; font-weight: 650; }
.activity-text small { font-size: 12px; color: var(--sub); }
.activity-amount { font-variant-numeric: tabular-nums; }
.activity-glyph { display: grid; place-items: center; width: 34px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); }
.activity-row > svg { color: var(--sub); }

@media (max-width: 440px) {
  .activity-row { padding: 12px; gap: 8px; }
  .activity-glyph { width: 28px; height: 32px; }
}
.work-order { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.work-order + .work-order { border-top: 1px solid var(--line); }
.work-order > div:last-child { margin-left: auto; text-align: right; }
.work-order small { display: block; font-size: 12px; color: var(--sub); }
.order-glyph { display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); width: 38px; height: 38px; flex: none; }
.phone-nav { display: none; }
@media screen and (max-width: 760px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .work-order { padding: 12px 14px; }
  .phone-nav {
    position: fixed; inset: auto 0 0; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line);
  }
  .phone-nav button { display: grid; place-content: center; justify-items: center; gap: 3px; min-height: 48px; font-size: 12px; background: var(--white); color: var(--sub); border-radius: 8px; }
  .phone-nav [aria-current="page"] { color: var(--accent-dark); background: var(--accent-soft); font-weight: 650; }
  .workspace { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .shell.menu-open .phone-nav { visibility: hidden; }
  #notice:not(:empty) { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}
.metric,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.metric {
  padding: 21px 23px;
  min-height: 145px;
  position: relative;
  overflow: hidden;
}
.metric:first-child {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.metric:first-child:after {
  content: "";
  position: absolute;
  right: -51px;
  top: -62px;
  width: 140px;
  height: 140px;
  border: 1px solid #6a806b;
  border-radius: 50%;
  border-color: var(--accent-ring);
  box-shadow:
    0 0 0 12px var(--accent),
    0 0 0 13px var(--accent-ring),
    0 0 0 25px var(--accent),
    0 0 0 26px var(--accent-ring);
  pointer-events: none;
}
.metric > span,
.metric > strong,
.metric > small {
  display: block;
  position: relative;
  z-index: 1;
}
.metric > span {
  font-size: 13px;
  font-weight: 570;
}
.metric > strong {
  font-size: clamp(23px, 2.2vw, 38px);
  letter-spacing: -1px;
  margin: 14px 0 8px;
  font-variant-numeric: tabular-nums;
}
.metric > small {
  font-size: 12px;
  color: var(--sub);
}
.metric:first-child > small {
  color: #d7e3d3;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr);
  gap: 18px;
  align-items: start;
}
.panel {
  overflow: hidden;
  margin-bottom: 18px;
}
.panel-head {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  min-height: 57px;
}
.panel h2,
.panel h3,
.dialog-head h2 {
  font-family: inherit;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.panel h3 {
  font-size: 18px;
}
.stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #e7ebe3;
}
.stack-row:last-child {
  border-bottom: 0;
}
.stack-row small,
.subline {
  display: block;
  color: var(--sub);
  font-size: 12px;
  margin-top: 3px;
}
.stack-row strong {
  font-size: 14px;
}
.stack-row .sum,
.numeric {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.rows {
  overflow: auto;
}
.data {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.data th,
.data td {
  text-align: left;
  padding: 12px 17px;
  border-bottom: 1px solid var(--rule);
}
.data th {
  font-size: 11px;
  color: var(--sub);
  font-weight: 650;
  background: var(--raised);
  white-space: nowrap;
}
.data tr:last-child td {
  border-bottom: 0;
}
.data td.num,
.data th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.data .link-btn {
  font-size: 13px;
}
.data tbody tr:hover {
  background: var(--white);
}
.positive {
  color: var(--positive);
}
.negative {
  color: var(--negative);
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 100px;
  background: var(--mint);
  color: #416044;
  font-weight: 600;
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}
.badge.warn {
  background: #f7ead1;
  color: #7f5e21;
}
.badge.gray {
  background: #ecede7;
  color: #5c685e;
}
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  font-size: 13px;
  white-space: nowrap;
  background: transparent;
  color: var(--sub);
  padding: 8px 10px 11px;
  border-bottom: 2px solid transparent;
}
.tabs button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: bold;
}
.filters {
  flex-wrap: wrap;
  margin: 0 0 16px;
  align-items: end;
}
.filters label {
  font-size: 11px;
  display: grid;
  gap: 3px;
  color: var(--sub);
}
.filters select,
.filters input {
  max-width: 100%;
  min-height: 36px;
}
.search-label {
  min-width: 160px;
}
.empty {
  padding: 27px 20px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.6;
}
.msg {
  padding: 11px 14px;
  background: #f7ebd5;
  color: #714f21;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.msg.error {
  background: #fae9e1;
  color: #843e2e;
}
.snapshot {
  display: grid;
  gap: 6px;
}
.snapshot > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 19px 0;
}
input,
select,
textarea {
  padding: 10px 11px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: 5px;
  min-width: 0;
  max-width: 100%;
}
textarea {
  resize: vertical;
  min-height: 65px;
}
.field {
  display: grid;
  align-content: start;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.wide {
  grid-column: 1/-1;
}
.split-fields,
.role-choices {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.split-fields .field {
  flex: 1 1 140px;
  min-width: 0;
}
.role-choices label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.split-fields legend,
.role-choices legend {
  font-weight: 600;
  padding-inline: 4px;
}
.form-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}
.dialog-head h2 {
  font-size: 26px;
}
dialog {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
  width: min(560px, calc(100% - 24px));
  max-height: 90dvh;
  box-shadow: 0 18px 80px #12291d36;
}
dialog:has(.wide-dialog) {
  width: min(850px, calc(100% - 24px));
}
dialog::backdrop {
  background: #142c226b;
}
.detail-kv {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 4px 0 14px;
}
.detail-kv small,
.detail-kv strong {
  display: block;
}
.detail-kv small {
  font-size: 11px;
  color: var(--sub);
  margin-bottom: 4px;
}
.detail-kv strong {
  font-size: 15px;
}
.help {
  margin: 8px 0;
}
.check-panel {
  border-radius: 8px;
  background: var(--paper);
  padding: 15px;
  margin-top: 15px;
}
.dialog-body .panel-head {
  padding: 12px;
}
.dialog-body .panel {
  margin: 12px 0;
}
.dialog-body .data td,
.dialog-body .data th {
  padding: 8px;
}
.dialog-body .actions {
  flex-wrap: wrap;
}
#notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  pointer-events: none;
  background: #1c3a2e;
  color: white;
  border-radius: 8px;
  padding: 0;
  font-size: 13px;
  max-width: 90vw;
}
#notice:not(:empty) {
  padding: 12px 18px;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-intro {
  background: var(--dark);
  color: #fff;
  padding: clamp(30px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  overflow: hidden;
}
.login-intro:after {
  content: "";
  width: 65vw;
  height: 65vw;
  border: 1px solid #4a6953;
  position: absolute;
  border-radius: 50%;
  bottom: -48vw;
  left: -14vw;
  box-shadow:
    0 0 0 22px var(--dark),
    0 0 0 23px #4a6953,
    0 0 0 46px var(--dark),
    0 0 0 47px #4a6953;
  pointer-events: none;
}
.login-intro h2 {
  font-weight: 700;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: -3px;
  max-width: 9em;
  margin: 0 0 20px;
}
.login-intro p {
  font-size: 16px;
  color: #d0ddcd;
  max-width: 24em;
  line-height: 1.55;
}
.login-form-pane {
  padding: 32px;
  display: grid;
  place-items: center;
}
.login-card { max-width: 360px; width: 100%; }
.login-card .login-preferences { margin-bottom: 16px; }
.login form {
  width: 100%;
  display: grid;
  gap: 19px;
}
.login h1 {
  font-size: 38px;
}
.login .btn {
  min-height: 44px;
}
.login .field input {
  min-height: 43px;
}
.login footer {
  font-size: 13px;
  color: #c6d4c9;
}
.mobile-overlay {
  display: none;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 188px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 10px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .metric {
    padding: 16px;
    min-height: 125px;
  }
  .content,
  .topbar {
    padding-inline: 24px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .topbar {
    padding: 10px 15px;
    min-height: 58px;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 225px;
    z-index: 5;
    transform: translateX(-105%);
    transition: transform 0.18s;
  }
  .shell.menu-open .sidebar {
    transform: translateX(0);
  }
  .shell.menu-open .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #13251d66;
    z-index: 4;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .content {
    padding: 24px 15px 35px;
  }
  .cards {
    gap: 8px;
  }
  .metric {
    padding: 12px;
    min-height: 103px;
  }
  .metric > span {
    font-size: 12px;
  }
  .metric > strong {
    font-size: clamp(20px, 4.8vw, 28px);
    margin: 10px 0 4px;
  }
  .metric > small {
    font-size: 11px;
  }
  .page-head {
    gap: 12px;
    margin-bottom: 18px;
  }
  .page-head h1 {
    font-size: 35px;
  }
  .topbar .today {
    font-size: 11px;
  }
  .panel-head {
    padding: 12px 14px;
  }
  .login {
    display: block;
  }
  .login-intro {
    padding: 24px;
    gap: 18px;
  }
  .login-intro h2,
  .login-intro p,
  .login-intro footer {
    display: none;
  }
  .login-intro:after {
    display: none;
  }
  .login-form-pane {
    padding: 42px 24px;
  }
  .data td,
  .data th {
    padding: 10px 12px;
  }
  .cards {
    margin-bottom: 15px;
  }
  .filters > label {
    max-width: 100%;
  }
  .factory-icon {
    display: none;
  }
  .actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 440px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .topbar .today svg {
    display: none;
  }
  .metric:first-child:after {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .metric:first-child {
    grid-column: 1/-1;
    min-height: auto;
  }
  .metric:first-child:after {
    display: block;
  }
  .metric:first-child strong {
    font-size: 26px;
    margin-top: 5px;
  }
  .actions .btn {
    min-height: 35px;
  }
  .actions {
    gap: 6px;
  }
  .page-head .btn {
    font-size: 12px;
  }
  .page-head {
    align-items: flex-start;
  }
}
@media print {
  body {
    background: var(--white);
  }
  .sidebar,
  .topbar,
  .page-head .actions,
  .filters,
  .tabs,
  .mobile-overlay,
  button,
  #notice,
  .no-print {
    display: none !important;
  }
  .shell,
  .content {
    display: block;
    padding: 0;
  }
  .panel {
    break-inside: avoid;
  }
  .shell:has(+ dialog[open]) {
    display: none;
  }
  dialog[open] {
    position: static;
    max-height: none;
    width: 100%;
    max-width: none;
    box-shadow: none;
    border: 0;
    margin: 0;
  }
  .data .link-btn {
    display: inline !important;
    color: inherit;
  }
  .rows {
    overflow: visible;
  }
}
.profile {
  padding: 2px 0;
  background: none;
  color: white;
  text-align: left;
}
.profile:hover strong {
  text-decoration: underline;
}
@media (min-width: 761px) {
  .icon-btn.menu-toggle {
    display: none;
  }
}
.dialog-body .panel .detail-kv {
  padding: 13px;
}
.lang,
.lang-login {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--green);
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
}
.lang {
  margin-left: auto;
}
.topbar .today {
  margin-left: 0;
}
.lang-login {
  justify-self: end;
}
html[lang="bn"] .nav button {
  font-size: 14px;
}
html[lang="bn"] .page-head h1 {
  letter-spacing: -0.5px;
}
@media (max-width: 440px) {
  .topbar .today {
    display: none;
  }
}
@media print {
  body:has(#editor[open]) #app {
    display: none;
  }
  .lang,
  .lang-login {
    display: none;
  }
}
@media (max-width: 760px) {
  .shell:not(.menu-open) .sidebar {
    visibility: hidden;
  }
}

/* Business types: accent colour per workspace (generic tones, no brand colours). */
:root[data-business="beverage_dealer"] {
  --accent: #8c1d2b;
  --accent-dark: #6b1520;
  --accent-ring: #b0525d;
  --accent-soft: #f7e6e6;
}
:root[data-business="tobacco_dealer"] {
  --accent: #1d5a3a;
  --accent-dark: #14422a;
  --accent-ring: #4f8a68;
  --accent-soft: #e2efe6;
}
.workspace-kind {
  margin: 8px 9px 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bdcfc0;
}
.trade-cards {
  grid-template-columns: repeat(auto-fit, minmax(max(190px, calc(25% - 12px)), 1fr));
}
.metric.alert {
  border-color: #e2c27f;
  background: #fdf7ea;
}
.today-margin {
  margin: -8px 0 18px;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 16px 20px;
}
.btn.quick {
  justify-content: flex-start;
  min-height: 48px;
  background: var(--accent-soft);
  border-color: transparent;
  text-align: left;
}
.btn.quick:hover {
  border-color: var(--accent);
}
.quick-row .btn {
  min-height: 34px;
}
.items {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 10px;
}
.items legend {
  font-weight: 600;
  font-size: 12px;
  padding-inline: 4px;
}
.item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.item-row > .field:first-child {
  flex: 2 1 200px;
}
.item-row .field {
  flex: 1 1 110px;
  min-width: 0;
}
.item-row .qty-field {
  flex: 0 1 96px;
}
.item-row .price-field {
  flex: 0 1 130px;
}
.item-row input,
.item-row select {
  width: 100%;
}
.line-info {
  flex: 1 1 120px;
  display: grid;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  align-self: center;
}
.avail {
  color: var(--sub);
  font-size: 11px;
}
.avail.negative,
.difference.shortage {
  color: var(--rust);
}
.row-remove {
  min-height: 36px;
}
.items-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.doc-total {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.doc-total strong {
  font-size: 16px;
}
.inline-qty {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: end;
}
.inline-qty .qty-field {
  width: 82px;
  font-size: 11px;
}
.inline-qty .qty-field input {
  padding: 7px 8px;
}
.reco h3,
.settle-money h3 {
  font-family: inherit;
  font-weight: 500;
  font-size: 19px;
  margin-bottom: 4px;
}
.reco .rows {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
}
.money-block {
  display: grid;
  gap: 6px;
  max-width: 420px;
  font-variant-numeric: tabular-nums;
}
.money-block > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.money-block .total {
  border-top: 1px solid var(--ink);
  padding-top: 6px;
  font-weight: 650;
}
.settle-money {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.handed {
  max-width: 260px;
}
.difference {
  font-size: 17px;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--raised);
  color: var(--sub);
}
.difference.shortage {
  background: #fae4dd;
}
.difference.excess {
  background: #fbf0d4;
  color: #7a5715;
}
.difference.balanced {
  background: #e3f0e2;
  color: #2f6440;
}
.settle-errors {
  margin: 0;
  padding-left: 30px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}
.check-row input {
  margin-top: 3px;
}
.check-field span {
  display: flex;
  gap: 8px;
  align-items: center;
}
.delivery {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
  display: grid;
  gap: 8px;
}
.delivery.off {
  opacity: 0.7;
}
.delivery .sum {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.delivery-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: end;
  font-size: 13px;
}
.shop-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px 14px;
  max-height: 50dvh;
  overflow: auto;
}
.shop-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--rule);
}
.shop-pick .seq {
  display: grid;
  font-size: 10px;
  color: var(--sub);
}
.shop-pick .seq input {
  width: 70px;
  padding: 5px 7px;
}
.data .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
  margin: 2px 4px 2px 0;
}
@media (max-width: 760px) {
  .item-row > .field:first-child {
    flex-basis: 100%;
  }
  .quick-actions {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }
  .trade-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 440px) {
  .trade-cards .metric:first-child,
  .trade-cards .metric:last-child:nth-child(even) {
    grid-column: 1/-1;
  }
}
.split > div {
  min-width: 0;
}
.panel > .money-block {
  padding: 14px 20px 6px;
}
.panel > .difference {
  margin: 8px 20px 16px;
}
.item-row .field:has(select) {
  flex: 1 1 170px;
}

.login-preferences {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.theme-picker { font-size: 13px; min-width: 0; }
.theme-picker summary { cursor: pointer; padding: 9px 2px; font-weight: 650; }
.theme-picker summary:focus-visible { outline: 2px solid currentColor; }
.theme-options { display: grid; gap: 12px; padding: 8px 0; }
.appearance-settings { margin-top: 20px; }
.appearance-settings .theme-options { gap: 16px; padding-top: 12px; }
.appearance-settings .theme-group span { min-height: 44px; padding-inline: 12px; }
.theme-group {
  border: 0; padding: 0; margin: 0; min-width: 0;
  display: flex; flex-wrap: wrap; gap: 5px;
}
.theme-group legend { padding: 0 0 4px; font-size: 12px; font-weight: 600; }
.theme-group label { position: relative; cursor: pointer; }
.theme-group input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.theme-group span {
  display: flex; align-items: center; gap: 5px; padding: 6px 8px;
  min-height: 32px; border: 1px solid currentColor; border-radius: 8px;
}
.theme-group input:checked + span { background: var(--ink); color: var(--paper); }
.theme-group input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }
.theme-group i { width: 17px; height: 17px; border-radius: 50%; background: var(--day); border: 1px solid #80808080; }
[data-theme="dark"] .theme-group i { background: var(--night); }
[data-skin="Classic"] .theme-backdrop { display: none; }
.login-preferences { align-items: start; }
.login-preferences > button { flex-shrink: 0; }

@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #edf3f6;
    --sub: #abbcc7;
    --paper: #101a21;
    --white: #1b2933;
    --dark: #13212b;
    --line: #3d505d;
    --raised: #24343f;
    --rule: #344550;
    --control-border: #526573;
    --green: #a5d6be;
    --mint: #284538;
    --rust: #ffb49b;
    --positive: #9ad8ad;
    --negative: #ffb49b;
    --accent-dark: #ffb28a;
    --accent-soft: #463024;
  }
  :root[data-theme="dark"][data-business="beverage_dealer"] {
    --accent-dark: #ffa5ad;
    --accent-soft: #492b33;
  }
  :root[data-theme="dark"][data-business="tobacco_dealer"] {
    --accent-dark: #98dcad;
    --accent-soft: #233e33;
  }
  [data-theme="dark"] .btn.primary:hover { background: var(--accent); filter: brightness(1.12); }
  [data-theme="dark"] :is(.tabs button[aria-selected="true"], .factory-icon, .order-glyph, .work-actions svg, .btn.quick svg) { color: var(--accent-dark); }
  [data-theme="dark"] .badge { color: var(--positive); }
  [data-theme="dark"] .badge.gray { color: var(--sub); background: var(--raised); }
  [data-theme="dark"] :is(.msg, .metric.alert, .badge.warn, .difference.excess) { background: #413522; color: #ffdc9b; }
  [data-theme="dark"] :is(.msg.error, .difference.shortage) { background: #412922; color: var(--negative); }
  [data-theme="dark"] .difference.balanced { background: var(--mint); color: var(--positive); }
}

@media screen {
  :root[data-skin="Glass"] {
    --ink: var(--backdrop-ink);
    --sub: var(--backdrop-muted);
    --paper: var(--backdrop-base);
    --pane: rgb(255 255 255 / 33%);
    --edge: rgb(255 255 255 / 64%);
    --chrome: rgb(255 255 255 / 65%);
    --deep-pane: color-mix(in srgb, var(--backdrop-base) 23%, #12202c);
    --lift: 0 6px 20px rgb(20 40 60 / 10%), inset 0 1px rgb(255 255 255 / 36%);
  }
  :root[data-skin="Glass"][data-theme="dark"] {
    --pane: rgb(255 255 255 / 6%);
    --edge: rgb(255 255 255 / 18%);
    --chrome: color-mix(in srgb, var(--backdrop-base) 85%, #364353);
    --deep-pane: color-mix(in srgb, var(--backdrop-base) 80%, #233342);
    --lift: 0 6px 20px rgb(0 0 0 / 22%), inset 0 1px rgb(255 255 255 / 12%);
  }
  [data-skin="Glass"] body { min-height: 100dvh; background: var(--backdrop) fixed; }
  [data-skin="Glass"] :is(.panel, .metric:not(:first-child):not(.alert), .work-actions .btn, .login-card) {
    background: var(--pane); border: 1px solid var(--edge);
    box-shadow: var(--lift); backdrop-filter: blur(14px);
  }
  [data-skin="Glass"] .login-card { max-width: 415px; padding: clamp(17px, 3vw, 30px); border-radius: 16px; }
  [data-skin="Glass"] :is(.topbar, .phone-nav) { background: var(--chrome); backdrop-filter: blur(18px); }
  [data-skin="Glass"] .phone-nav button:not([aria-current="page"]) { background: transparent; }
  [data-skin="Glass"] :is(.sidebar, .login-intro, .balance-sheet) { background: var(--deep-pane); }
  [data-skin="Glass"] .balance-side { background: rgb(5 20 30 / 18%); }
  [data-skin="Glass"] dialog { background: var(--backdrop) var(--backdrop-base); border-color: var(--edge); }
}

:root:lang(bn) { font-family: "Noto Sans Bengali", "Plus Jakarta Sans", sans-serif; }
:lang(bn) :is(h1, h2, h3, .brand, .balance-main strong) { letter-spacing: normal; line-height: 1.4; }
.appearance-settings h3, .profile small { display: flex; align-items: center; gap: 5px; }
.theme-picker summary svg { vertical-align: middle; }
.balance-main strong, .balance-side strong, .sum, .num { font-variant-numeric: tabular-nums; }

.dealer-entry-details { border-top: 1px solid var(--line); padding-top: .75rem; }
.dealer-entry-details > summary { cursor: pointer; font-weight: 650; min-height: 38px; padding-block: .45rem; }
.dealer-entry-details > .form-grid { padding-block: .4rem .75rem; }
.trade-form > .form-grid:has(> .dealer-entry-details:not([open])) .dealer-optional-price { display: none; }
.dealer-settings-page { max-width: 55rem; }
.dealer-settings-body { padding: 16px clamp(14px, 3vw, 22px) 20px; }
.dealer-settings-body .detail-kv {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  margin: 0;
}
.dealer-settings-body .detail-kv + .btn { margin-top: 14px; }
