:root {
  --bg: #f7f9fa;
  --surface: #ffffff;
  --surface-soft: #f1f7f7;
  --text: #102325;
  --muted: #68777a;
  --line: #dbe4e6;
  --line-strong: #c7d5d8;
  --teal: #007c78;
  --teal-dark: #005f5c;
  --teal-soft: #e4f4f3;
  --amber: #f79009;
  --amber-soft: #fff3df;
  --green: #18864b;
  --green-soft: #e7f6ed;
  --red: #d92d20;
  --red-soft: #fff0ee;
  --blue: #1f69c9;
  --shadow: 0 12px 36px rgba(15, 35, 40, 0.08);
  --font-fa: "IRANSans", "IranSans", "IRANSansX", "Vazirmatn", "Tahoma", sans-serif;
  --font-en: "Dubai", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-family: var(--font-fa);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-fa);
  letter-spacing: 0;
  direction: rtl;
  text-align: right;
}

:lang(en),
[dir="ltr"] {
  font-family: var(--font-en);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.desktop-sidebar {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.avatar-button {
  border: 0;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 80% 10%, rgba(0, 124, 120, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.login-card {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.login-brand p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.login-brand h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.45;
}

.login-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-actions {
  display: grid;
  gap: 10px;
}

.login-footnote,
.otp-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.login-footnote {
  justify-content: flex-start;
}

.otp-demo strong {
  color: var(--teal);
  font-size: 18px;
  letter-spacing: 4px;
  direction: ltr;
}

.otp-input {
  direction: ltr;
  text-align: center;
  letter-spacing: 8px;
  font-size: 20px;
  font-weight: 800;
}

.form-error {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 720;
}

.session-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
}

.session-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.content {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 14px 14px 92px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-title {
  margin: 18px 0 10px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 780;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.label {
  font-size: 12px;
  font-weight: 720;
}

.required {
  color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  text-align: right;
}

input[name="amount"],
input[name="account"] {
  direction: ltr;
  text-align: left;
}

select[name="currency"] {
  direction: rtl;
  text-align: right;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.amount-row {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 8px;
}

.segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.segment.priority {
  grid-template-columns: repeat(3, 1fr);
}

.seg-option {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.seg-option.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.seg-option.priority-high.active {
  border-color: var(--amber);
  background: var(--amber);
  color: #fff;
}

.seg-option.priority-medium.active {
  border-color: #f5bd35;
  background: #f5bd35;
  color: #412900;
}

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

.capture-tile {
  min-height: 74px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  position: relative;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal);
  text-align: center;
  font-size: 11px;
  font-weight: 780;
  overflow: hidden;
}

.capture-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-chip {
  display: grid;
  gap: 2px;
  color: var(--text);
}

.file-chip small {
  color: var(--muted);
  font-weight: 620;
}

.summary-box,
.notice,
.panel,
.queue-card,
.metric,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel {
  padding: 14px;
}

.summary-box {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.summary-row span:first-child {
  color: var(--muted);
}

.summary-row span:last-child {
  font-weight: 720;
  text-align: left;
}

.notice {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #f4f8ff;
  color: #255184;
  font-size: 12px;
}

.primary-bar {
  position: sticky;
  bottom: 70px;
  z-index: 10;
  margin-top: 18px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 780;
}

.button.primary {
  background: var(--teal);
  color: #fff;
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.outline {
  border-color: var(--teal);
  background: var(--surface);
  color: var(--teal);
}

.button.danger {
  border-color: #f6aaa3;
  background: var(--surface);
  color: var(--red);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: -14px -14px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 50px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.tab.active {
  border-color: var(--teal);
  color: var(--teal);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.status,
.priority-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 780;
}

.status.submitted,
.status.review {
  background: #eaf2ff;
  color: var(--blue);
}

.status.approved,
.status.paid {
  background: var(--green-soft);
  color: var(--green);
}

.status.rejected {
  background: var(--red-soft);
  color: var(--red);
}

.priority-chip.high {
  background: var(--amber-soft);
  color: #b45309;
  border: 1px solid #fed7aa;
}

.priority-chip.medium {
  background: #fff8df;
  color: #8a5b00;
  border: 1px solid #fde68a;
}

.priority-chip.low {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #bfe7cf;
}

.empty {
  padding: 28px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.queue-list {
  display: grid;
  gap: 12px;
}

.queue-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: 0 6px 20px rgba(15, 35, 40, 0.04);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-head h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.card-meta {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.card-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card-meta span:first-child {
  color: var(--muted);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pay-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pay-actions .button {
  min-height: 40px;
}

.timeline {
  display: grid;
  gap: 0;
  padding: 8px 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  min-height: 58px;
  position: relative;
}

.timeline-row:not(:last-child)::before {
  content: "";
  position: absolute;
  right: 8px;
  top: 18px;
  bottom: -2px;
  width: 1px;
  background: var(--line-strong);
}

.dot {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 2px solid #8b9da1;
  border-radius: 50%;
  background: var(--surface);
  z-index: 1;
}

.timeline-row.done .dot {
  border-color: var(--blue);
  background: var(--blue);
}

.timeline-row h4 {
  margin: 0 0 3px;
  font-size: 13px;
}

.timeline-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.metric {
  padding: 14px;
}

.metric p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.metric strong {
  font-size: 24px;
}

.desktop-dashboard {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow: hidden;
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 12px;
}

th {
  color: var(--muted);
  font-weight: 760;
  background: #fbfcfc;
}

.table-scroll {
  overflow-x: auto;
}

.chart-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.donut-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--amber) 0 25%, #f5bd35 25% 60%, #44b77a 60% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--surface);
}

.legend {
  display: grid;
  gap: 9px;
  font-size: 12px;
}

.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 68px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-item {
  border: 0;
  background: transparent;
  color: #516166;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 720;
}

.nav-item.active {
  color: var(--teal);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 82px;
  left: 14px;
  z-index: 50;
  display: none;
  padding: 13px 14px;
  border-radius: 8px;
  background: #102325;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast.show {
  display: block;
}

.camera-preview {
  display: none;
  max-height: 148px;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.camera-preview.visible {
  display: block;
}

.extract-panel {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid #bfe7cf;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.extract-panel.muted {
  border-color: var(--line);
  background: #f8fbfb;
  color: var(--muted);
}

.extract-panel strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

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

.extract-head span {
  color: var(--green);
  font-size: 11px;
  font-weight: 820;
}

.extract-panel p,
.extract-panel span {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.45;
}

.extract-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.extract-fields span {
  margin: 0;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}

.calendar-field {
  position: relative;
}

.date-input {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.date-input .icon {
  color: var(--teal);
}

.calendar-popover {
  display: none;
  position: relative;
  z-index: 12;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calendar-popover.open {
  display: grid;
}

.calendar-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
}

.calendar-head strong {
  text-align: center;
  font-size: 13px;
}

.calendar-head [data-calendar-next] .icon {
  transform: rotate(180deg);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekdays span {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.calendar-day,
.calendar-empty {
  aspect-ratio: 1;
  min-width: 0;
}

.calendar-day {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
}

.calendar-day:hover {
  border-color: var(--teal);
}

.calendar-day.selected {
  background: var(--teal);
  color: #fff;
}

.calendar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}







.warehouse-stock-panel .inventory-list {
  margin-top: 0;
}


.button.whatsapp {
  border-color: #1faa59;
  background: #e9f9ef;
  color: #137a3b;
  text-decoration: none;
}

.whatsapp-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}

.whatsapp-actions.compact {
  margin: 0;
  grid-template-columns: 1fr;
}

.whatsapp-notice .icon {
  color: #1faa59;
}

.receipt-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfb;
}

.receipt-upload {
  min-height: 58px;
}

.receipt-summary {
  display: grid;
  gap: 3px;
}

.receipt-summary strong {
  font-size: 12px;
}

.receipt-summary small {
  color: var(--muted);
  font-size: 11px;
}

.receipt-preview {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sales-layout {
  display: grid;
  gap: 12px;
}

.quote-list {
  display: grid;
  gap: 12px;
}

.quote-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.quote-note {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (min-width: 760px) {
  .sales-layout {
    grid-template-columns: minmax(320px, 440px) 1fr;
    align-items: start;
  }
}
.products-layout {
  display: grid;
  gap: 12px;
}

.bom-builder {
  align-content: start;
}

.two-col {
  grid-template-columns: 1fr;
}

.bom-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.bom-section h3 {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
}

.bom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.bom-row strong,
.bom-row p {
  margin: 0;
}

.bom-row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.purchase-history {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.purchase-history span {
  border-radius: 6px;
  padding: 7px 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .products-layout {
    grid-template-columns: minmax(300px, 420px) 1fr;
    align-items: start;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}
.list-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.list-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.product-picker {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfb;
}

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

.product-list {
  display: grid;
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.product-card.low {
  border-color: #fed7aa;
  background: #fffaf2;
}

.product-main {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.product-main strong,
.product-main p {
  margin: 0;
}

.product-main strong {
  display: block;
  font-size: 14px;
}

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

@media (min-width: 760px) {
  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.production-side-panel {
  display: grid;
  align-content: start;
}
.counterparty-tools {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfb;
}

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

.counterparty-tools .button {
  min-height: 42px;
}
.dashboard-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #e8f6f5 100%);
}

.dashboard-hero p,
.dashboard-hero h2 {
  margin: 0;
}

.dashboard-hero p,
.dashboard-hero span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.dashboard-hero h2 {
  margin-top: 5px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.5;
}

.access-grid,
.inventory-list {
  display: grid;
  gap: 12px;
}

.access-card {
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: right;
  box-shadow: 0 6px 20px rgba(15, 35, 40, 0.04);
}

.access-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
}

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

.access-content strong {
  font-size: 15px;
}

.access-content small,
.access-content em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.6;
}

.access-content em {
  color: var(--teal);
  font-weight: 760;
}

.dashboard-metrics {
  margin-top: 12px;
}

.warehouse-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inventory-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.inventory-card.low {
  border-color: #f6aaa3;
  background: #fffafa;
}

.inventory-card strong,
.inventory-card p {
  margin: 0;
}

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

.inventory-stock {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.inventory-stock span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-stock strong {
  color: var(--teal);
  font-size: 20px;
}
@media (min-width: 760px) {
  .app-shell {
    grid-template-columns: 244px 1fr;
    grid-template-rows: 1fr;
  }

  .desktop-sidebar {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 18px;
    min-height: 100vh;
    padding: 18px;
    background: var(--surface);
    border-left: 1px solid var(--line);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 820;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--teal);
    color: #fff;
    display: grid;
    place-items: center;
  }

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

  .side-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    padding: 0 10px;
    background: transparent;
    color: #445457;
    font-size: 13px;
    font-weight: 740;
    text-align: right;
  }

  .side-link.active {
    background: var(--teal-soft);
    color: var(--teal);
  }

  .topbar {
    min-height: 68px;
    padding: 14px 24px;
  }

  .content {
    padding: 18px 24px 32px;
  }

  .bottom-nav {
    display: none;
  }

  .primary-bar {
    position: static;
  }

  .request-layout {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
  }

  .panel {
    padding: 16px;
  }

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

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

  .desktop-dashboard {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .desktop-dashboard .table-wrap {
    grid-column: 1;
  }

  .toast {
    right: auto;
    left: 24px;
    width: min(360px, calc(100vw - 48px));
    bottom: 24px;
  }
}

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

  .amount-row,
  .card-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  .pay-actions {
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
    align-items: start;
  }

  .pay-actions .whatsapp-actions.compact,
  .approval-card .whatsapp-actions.compact {
    grid-template-columns: 1fr 1fr;
  }
}
.warehouse-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.warehouse-hero p,
.warehouse-hero h2 {
  margin: 0;
}

.warehouse-hero p {
  color: var(--muted);
  font-size: 12px;
  direction: ltr;
  text-align: left;
}

.warehouse-hero h2 {
  margin-top: 4px;
  font-size: 20px;
}

.warehouse-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.warehouse-kpi {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
}

.warehouse-kpi > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
}

.warehouse-kpi strong,
.warehouse-kpi small,
.warehouse-kpi em {
  display: block;
}

.warehouse-kpi strong {
  font-size: 20px;
}

.warehouse-kpi small,
.warehouse-kpi em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.5;
}

.warehouse-actions-panel,
.warehouse-layout,
.stock-ledger-list,
.item-master-list,
.location-list,
.audit-list,
.report-list {
  display: grid;
  gap: 12px;
}

.warehouse-actions-panel {
  margin-bottom: 12px;
}

.warehouse-action-grid,
.scan-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scan-action {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfc;
  color: var(--text);
}

.scan-action strong {
  font-size: 12px;
  letter-spacing: 0;
  direction: ltr;
}

.scan-action span {
  color: var(--muted);
  font-size: 11px;
}

.item-master-card,
.stock-movement-card,
.location-card,
.audit-row {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.item-master-card.low {
  border-color: #fed7aa;
  background: #fffaf2;
}

.item-master-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
}

.item-master-head strong,
.item-master-head p,
.movement-note,
.audit-row p {
  margin: 0;
}

.item-master-head p,
.movement-note,
.audit-row p,
.audit-row span,
.audit-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

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

.stock-buckets div,
.report-row {
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
}

.stock-buckets span,
.report-row span,
.report-row em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.stock-buckets strong,
.report-row strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.alias-row,
.movement-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alias-row span,
.movement-effects span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
}

.movement-effects .positive {
  background: var(--green-soft);
  color: var(--green);
}

.movement-effects .negative {
  background: var(--red-soft);
  color: var(--red);
}

.location-card {
  grid-template-columns: 58px 1fr;
  align-items: center;
}

.location-card strong,
.location-card p {
  margin: 0;
}

.location-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  direction: ltr;
  text-align: left;
}

.fake-qr {
  width: 58px;
  aspect-ratio: 1;
  border: 6px solid #102325;
  border-radius: 4px;
  background:
    linear-gradient(90deg, #102325 10px, transparent 10px 18px, #102325 18px 28px, transparent 28px),
    linear-gradient(#102325 8px, transparent 8px 16px, #102325 16px 24px, transparent 24px),
    #fff;
}

.mini-heading {
  margin: 12px 0 0;
  color: var(--teal);
  font-size: 13px;
}

.warehouse-reports-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 760px) {
  .warehouse-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .warehouse-layout,
  .warehouse-reports-grid {
    grid-template-columns: minmax(340px, 520px) minmax(0, 1fr);
    align-items: start;
  }

  .warehouse-reports-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .warehouse-action-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .item-master-list,
  .stock-ledger-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* 2026 mobile operator UI refresh */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #eef5f3;
  --text: #0f2326;
  --muted: #657679;
  --line: #d8e2e1;
  --line-strong: #bccdcc;
  --teal: #007a72;
  --teal-dark: #005e58;
  --teal-soft: #e0f4f0;
  --blue: #2563eb;
  --blue-soft: #edf4ff;
  --amber: #f59e0b;
  --amber-soft: #fff4dd;
  --green: #168653;
  --green-soft: #e7f6ef;
  --red: #d92d20;
  --red-soft: #fff1ee;
  --ink-contrast: #102f34;
  --shadow: 0 18px 44px rgba(18, 38, 42, 0.11);
  --shadow-soft: 0 1px 2px rgba(18, 38, 42, 0.05), 0 10px 28px rgba(18, 38, 42, 0.07);
}

body {
  background: linear-gradient(180deg, #f8fbfa 0%, var(--bg) 42%, #edf3f1 100%);
}

.login-shell {
  background: linear-gradient(180deg, #f8fbfa 0%, #edf4f2 100%);
}

.topbar {
  min-height: 60px;
  padding: 10px 14px;
  background: rgba(250, 252, 251, 0.88);
  border-bottom: 1px solid rgba(16, 35, 38, 0.08);
  box-shadow: 0 8px 22px rgba(18, 38, 42, 0.05);
}

.topbar h1 {
  font-size: 16px;
}

.icon-button,
.avatar-button,
.button,
.seg-option,
.tab,
.nav-item,
.access-card,
.scan-action,
.side-link {
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.icon-button:focus-visible,
.avatar-button:focus-visible,
.button:focus-visible,
.seg-option:focus-visible,
.tab:focus-visible,
.nav-item:focus-visible,
.access-card:focus-visible,
.scan-action:focus-visible,
.side-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

.avatar,
.brand-mark {
  background: var(--ink-contrast);
}

.content {
  padding-top: 12px;
}

.summary-box,
.notice,
.panel,
.queue-card,
.metric,
.table-wrap,
.login-card,
.item-master-card,
.stock-movement-card,
.location-card,
.audit-row,
.warehouse-kpi,
.scan-action {
  border-color: rgba(16, 35, 38, 0.09);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.panel,
.queue-card,
.metric,
.login-card,
.item-master-card,
.stock-movement-card,
.location-card,
.audit-row {
  overflow: hidden;
}

input,
select,
textarea {
  border-color: rgba(16, 35, 38, 0.13);
  background: #fbfdfc;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 122, 114, 0.14);
}

.button.primary {
  background: var(--ink-contrast);
  box-shadow: 0 10px 24px rgba(16, 47, 52, 0.16);
}

.button.primary:hover {
  background: #0b2529;
}

.button.outline {
  border-color: rgba(0, 122, 114, 0.32);
  background: #fbfdfc;
}

.bottom-nav {
  right: 10px;
  bottom: 10px;
  left: 10px;
  min-height: 64px;
  padding: 4px;
  border: 1px solid rgba(16, 35, 38, 0.11);
  border-radius: 8px;
  background: rgba(253, 254, 254, 0.9);
  box-shadow: 0 16px 38px rgba(18, 38, 42, 0.18);
}

.nav-item {
  border-radius: 8px;
  color: #667579;
}

.nav-item.active {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.nav-item .icon {
  width: 19px;
  height: 19px;
}

.dashboard-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
  border: 0;
  padding: 16px;
  background: var(--ink-contrast);
  color: #fff;
  box-shadow: var(--shadow);
}

.dashboard-hero p,
.dashboard-hero span,
.dashboard-hero h2 {
  color: inherit;
}

.dashboard-hero p {
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.55;
}

.date-chip {
  align-self: start;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82) !important;
  white-space: nowrap;
}

.operator-brief {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.operator-brief > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.operator-brief strong,
.operator-brief small {
  display: block;
}

.operator-brief strong {
  color: #fff;
  font-size: 13px;
}

.operator-brief small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.65;
}

.access-grid {
  gap: 10px;
}

.access-card {
  position: relative;
  min-height: 102px;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-color: rgba(16, 35, 38, 0.09);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.access-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--teal);
}

.access-card > .icon:last-child {
  color: #92a0a2;
}

.access-card:active,
.scan-action:active,
.nav-item:active,
.button:active,
.side-link:active {
  transform: translateY(1px) scale(0.995);
}

.access-icon {
  width: 46px;
  height: 46px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.access-content {
  gap: 5px;
}

.access-content strong {
  color: var(--text);
  font-size: 14px;
}

.access-content small {
  display: -webkit-box;
  min-height: 36px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.access-content em {
  width: fit-content;
  border: 1px solid rgba(0, 122, 114, 0.16);
  border-radius: 8px;
  padding: 2px 7px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
}

.access-requests::before,
.access-requests .access-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.access-requests::before {
  background: var(--blue);
}

.access-payments::before,
.access-payments .access-icon {
  background: var(--green-soft);
  color: var(--green);
}

.access-payments::before {
  background: var(--green);
}

.access-production::before,
.access-production .access-icon {
  background: var(--amber-soft);
  color: #b45309;
}

.access-production::before {
  background: var(--amber);
}

.access-sales::before,
.access-sales .access-icon {
  background: #eef7f8;
  color: #087184;
}

.access-sales::before {
  background: #0e8a9d;
}

.access-products::before,
.access-products .access-icon {
  background: #f0f7ec;
  color: #477521;
}

.access-products::before {
  background: #74a544;
}

.access-warehouse::before,
.access-warehouse .access-icon {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.access-warehouse::before {
  background: var(--teal);
}

.dashboard-metrics {
  margin-top: 10px;
}

.metric {
  position: relative;
  min-height: 92px;
  padding: 14px;
}

.metric::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: var(--teal);
}

.metric p {
  margin-bottom: 6px;
}

.metric strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.dashboard-metrics .metric:nth-child(1)::before {
  background: var(--blue);
}

.dashboard-metrics .metric:nth-child(2)::before {
  background: var(--amber);
}

.dashboard-metrics .metric:nth-child(3)::before {
  background: #0e8a9d;
}

.dashboard-metrics .metric:nth-child(4)::before {
  background: var(--red);
}

.warehouse-hero.panel {
  border: 0;
  background: #fff;
}

.warehouse-hero h2 {
  font-size: 19px;
}

.warehouse-kpis {
  gap: 8px;
}

.warehouse-kpi {
  min-height: 96px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-content: start;
  position: relative;
}

.warehouse-kpi > span {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.warehouse-kpi em {
  grid-column: 1 / -1;
  padding-top: 2px;
}

.scan-action {
  min-height: 82px;
  background: #fff;
}

.scan-action .icon {
  color: var(--teal-dark);
}

.item-master-card.low {
  border-color: rgba(245, 158, 11, 0.32);
  background: #fffaf2;
}

.stock-buckets div,
.report-row {
  border: 1px solid rgba(16, 35, 38, 0.07);
  background: #f7faf9;
}

.alias-row span,
.movement-effects span,
.badge,
.status,
.priority-chip {
  border-radius: 8px;
}

@media (hover: hover) {
  .icon-button:hover,
  .nav-item:hover,
  .side-link:hover {
    background: rgba(0, 122, 114, 0.08);
  }

  .access-card:hover,
  .scan-action:hover,
  .queue-card:hover,
  .item-master-card:hover,
  .stock-movement-card:hover {
    border-color: rgba(0, 122, 114, 0.22);
    box-shadow: 0 2px 5px rgba(18, 38, 42, 0.06), 0 16px 36px rgba(18, 38, 42, 0.11);
  }
}

@media (min-width: 760px) {
  .topbar {
    min-height: 64px;
    padding: 12px 24px;
  }

  .content {
    padding-top: 18px;
  }

  .bottom-nav {
    display: none;
  }

  .desktop-sidebar {
    background: rgba(253, 254, 254, 0.94);
    box-shadow: -10px 0 28px rgba(18, 38, 42, 0.04);
  }

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

@media (min-width: 1120px) {
  .access-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .date-chip {
    justify-self: start;
  }

  .access-card {
    min-height: 108px;
  }
}
/* Small-team UX layer */
.dashboard-section {
  margin-top: 12px;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head.compact {
  margin-bottom: 8px;
}

.section-head p,
.section-head h3 {
  margin: 0;
}

.section-head p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.section-head h3 {
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(0, 122, 114, 0.16);
  border-radius: 8px;
  padding: 3px 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
}

.workflow-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.workflow-chip {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.07);
}

.workflow-chip strong,
.workflow-chip small {
  display: block;
}

.workflow-chip strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.1;
}

.workflow-chip small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.4;
}

.workflow-chip.blue {
  border-color: rgba(147, 197, 253, 0.34);
}

.workflow-chip.green {
  border-color: rgba(134, 239, 172, 0.34);
}

.workflow-chip.amber,
.workflow-chip.red {
  border-color: rgba(251, 191, 36, 0.36);
}

.focus-board {
  padding: 0;
}

.next-action-list {
  display: grid;
  gap: 8px;
}

.next-action-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 78px;
  border: 1px solid rgba(16, 35, 38, 0.09);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  color: var(--text);
  text-align: right;
  box-shadow: var(--shadow-soft);
}

.next-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.next-action-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.next-action-copy strong,
.next-action-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-action-copy strong {
  font-size: 13px;
}

.next-action-copy small {
  color: var(--muted);
  font-size: 11px;
}

.next-action-card em {
  justify-self: end;
  max-width: 112px;
  border-radius: 8px;
  padding: 3px 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
  line-height: 1.5;
  text-align: center;
}

.next-action-card.action-blue .next-action-icon,
.quick-requests .icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.next-action-card.action-green .next-action-icon,
.quick-payments .icon {
  background: var(--green-soft);
  color: var(--green);
}

.next-action-card.action-amber .next-action-icon,
.quick-production .icon {
  background: var(--amber-soft);
  color: #b45309;
}

.next-action-card.action-cyan .next-action-icon,
.quick-sales .icon {
  background: #eef7f8;
  color: #087184;
}

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

.quick-pill {
  min-height: 70px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(16, 35, 38, 0.09);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--text);
  text-align: right;
  box-shadow: 0 1px 2px rgba(18, 38, 42, 0.04);
}

.quick-pill .icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  padding: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.quick-pill span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quick-pill strong,
.quick-pill small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-pill strong {
  font-size: 12px;
}

.quick-pill small {
  color: var(--muted);
  font-size: 10px;
}

.quick-warehouse .icon {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.team-dashboard-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.team-activity-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(16, 35, 38, 0.09);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.activity-list {
  display: grid;
  gap: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border-top: 1px solid rgba(16, 35, 38, 0.07);
}

.activity-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.activity-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-row strong,
.activity-row small,
.activity-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row strong {
  font-size: 12px;
}

.activity-row small {
  color: var(--muted);
  font-size: 11px;
}

.activity-row em {
  justify-self: end;
  max-width: 112px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.activity-blue .activity-dot {
  background: var(--blue);
}

.activity-green .activity-dot {
  background: var(--green);
}

.activity-amber .activity-dot {
  background: var(--amber);
}

.activity-cyan .activity-dot {
  background: #0e8a9d;
}

@media (hover: hover) {
  .next-action-card:hover,
  .quick-pill:hover {
    border-color: rgba(0, 122, 114, 0.2);
    box-shadow: 0 2px 5px rgba(18, 38, 42, 0.05), 0 14px 32px rgba(18, 38, 42, 0.09);
  }
}

@media (min-width: 760px) {
  .next-action-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-start-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .team-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
}

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

  .next-action-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .next-action-icon {
    width: 36px;
    height: 36px;
  }

  .next-action-card em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  .activity-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .activity-row em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }
}
/* Mobile-first tables and digit-safe layout */
[dir="rtl"] {
  font-variant-numeric: normal;
}

@media (max-width: 759px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-scroll {
    overflow: visible;
  }

  table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  tr {
    display: grid;
    gap: 0;
    width: 100%;
    border: 1px solid rgba(16, 35, 38, 0.09);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  td {
    display: grid;
    grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 38px;
    border-bottom: 1px solid rgba(16, 35, 38, 0.07);
    padding: 8px 0;
    font-size: 12px;
    line-height: 1.7;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
  }

  td .button {
    min-height: 38px;
    width: 100%;
  }
}

@media (max-width: 360px) {
  td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
@media (max-width: 360px) {
  .quick-pill {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 76px;
  }

  .quick-pill strong,
  .quick-pill small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.45;
  }
}
/* Dashboard finance and exchange widgets */
.dashboard-insight-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.exchange-panel,
.company-finance-panel {
  border: 1px solid rgba(16, 35, 38, 0.09);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.fx-current-grid,
.finance-kpi-grid {
  display: grid;
  gap: 8px;
}

.fx-current-grid {
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.fx-current-grid > div,
.finance-kpi {
  display: grid;
  gap: 3px;
  min-height: 76px;
  border: 1px solid rgba(16, 35, 38, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfa;
}

.fx-current-grid span,
.finance-kpi span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.fx-current-grid strong,
.finance-kpi strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.fx-current-grid small,
.finance-kpi small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.fx-gap {
  background: var(--amber-soft) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

.exchange-chart {
  height: 142px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  border: 1px solid rgba(16, 35, 38, 0.07);
  border-radius: 8px;
  padding: 10px 8px 8px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f3f7f6 100%);
}

.fx-day {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-items: end;
}

.fx-bars {
  height: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  align-items: end;
}

.fx-bar {
  min-height: 16px;
  border-radius: 6px 6px 2px 2px;
}

.fx-bar.free {
  background: var(--blue);
}

.fx-bar.ice {
  background: var(--teal);
}

.fx-day small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend.compact-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.legend-free {
  background: var(--blue);
}

.legend-ice {
  background: var(--teal);
}

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

.finance-kpi {
  position: relative;
  overflow: hidden;
}

.finance-kpi::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 4px;
  background: var(--teal);
}

.finance-kpi.blue::before {
  background: var(--blue);
}

.finance-kpi.green::before {
  background: var(--green);
}

.finance-kpi.red::before {
  background: var(--red);
}

.finance-kpi.amber::before {
  background: var(--amber);
}

.contract-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.contract-mini-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(16, 35, 38, 0.07);
  padding-top: 8px;
}

.contract-mini-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.contract-mini-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contract-mini-card strong,
.contract-mini-card small,
.contract-mini-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-mini-card strong {
  font-size: 12px;
}

.contract-mini-card small {
  color: var(--muted);
  font-size: 10px;
}

.contract-mini-card em {
  border-radius: 8px;
  padding: 3px 7px;
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
}

@media (min-width: 760px) {
  .dashboard-insight-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    align-items: start;
  }

  .fx-current-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .finance-kpi-grid {
    grid-template-columns: 1fr;
  }

  .exchange-chart {
    gap: 4px;
    padding-inline: 6px;
  }

  .fx-day small {
    white-space: normal;
  }
}

/* Role-based dashboard and access layer */
.topbar-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.role-badge {
  width: fit-content;
  border: 1px solid rgba(0, 122, 114, 0.18);
  border-radius: 8px;
  padding: 2px 7px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 820;
}

.sidebar-role {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(16, 35, 38, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: #f7fbfa;
}

.sidebar-role strong {
  font-size: 13px;
}

.sidebar-role small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.bottom-nav {
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
}

.role-dashboard-hero .workflow-strip {
  margin-top: 0;
}

.role-quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.role-access-grid {
  grid-template-columns: 1fr;
}

.role-work-panel,
.role-empty-state {
  border: 1px solid rgba(16, 35, 38, 0.09);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.role-task-list {
  display: grid;
  gap: 8px;
}

.role-task-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  border: 1px solid rgba(16, 35, 38, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--text);
  text-align: right;
}

.role-task-row span:not(.next-action-icon) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.role-task-row strong,
.role-task-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-task-row small {
  color: var(--muted);
  font-size: 11px;
}

.role-task-row em {
  max-width: 118px;
  border-radius: 8px;
  padding: 3px 7px;
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
  text-align: center;
}

.role-empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.role-empty-state h2,
.role-empty-state p,
.profile-head h2,
.profile-head p,
.payroll-head h2,
.payroll-head p {
  margin: 0;
}

.role-empty-state p,
.profile-head p,
.payroll-head p,
.payroll-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.profile-card {
  padding: 16px;
}

.profile-layout {
  display: grid;
  gap: 12px;
}

.profile-head,
.payroll-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-head h2,
.payroll-head h2 {
  font-size: 18px;
  line-height: 1.5;
}

.people-profile-form,
.people-profiles-panel {
  display: grid;
  gap: 12px;
}

.profile-form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.people-profile-list {
  display: grid;
  gap: 10px;
}

.person-profile-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(16, 35, 38, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.person-profile-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.person-profile-head strong,
.person-profile-head p {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-profile-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.person-contact-meta strong {
  overflow-wrap: anywhere;
}

.ltr-input,
.ltr-text {
  direction: ltr;
  text-align: left;
  font-family: var(--font-en);
}

.payroll-card,
.payroll-detail-card,
.warehouse-readonly-card {
  display: grid;
  gap: 12px;
}

.payroll-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.payroll-summary-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(16, 35, 38, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: #f7faf9;
}

.payroll-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.payroll-summary-grid strong {
  font-size: 18px;
  line-height: 1.35;
}

.payroll-summary-grid .net {
  background: var(--green-soft);
  color: var(--green);
}

.payroll-net {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 14px;
  background: var(--ink-contrast);
  color: #fff;
}

.payroll-net span,
.payroll-net small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.payroll-net strong {
  font-size: 24px;
}

.payroll-columns {
  display: grid;
  gap: 12px;
}

.payroll-columns section {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(16, 35, 38, 0.08);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.payroll-columns h3 {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 13px;
}

.payroll-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(16, 35, 38, 0.06);
  padding-bottom: 7px;
  font-size: 12px;
}

.payroll-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.payroll-line span {
  color: var(--muted);
}

.payroll-line strong {
  white-space: nowrap;
}

.payroll-line.total {
  color: var(--green);
  font-weight: 820;
}

.payroll-line.deduction.total {
  color: var(--red);
}

.payroll-notice {
  background: #f7fbfa;
  color: var(--teal-dark);
}

.readonly-role-panel {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.readonly-role-panel .icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  padding: 7px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.readonly-role-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.readonly-role-panel .section-title {
  margin-top: 0;
}

.warehouse-layout.read-only {
  align-items: start;
}

.access-payroll::before,
.access-payroll .access-icon {
  background: var(--green-soft);
  color: var(--green);
}

.access-payroll::before {
  background: var(--green);
}

.access-profile::before,
.access-profile .access-icon,
.quick-profile .icon {
  background: #f4f2ff;
  color: #5b42b3;
}

.access-profile::before {
  background: #6d5bd0;
}

.quick-payroll .icon {
  background: var(--green-soft);
  color: var(--green);
}

@media (min-width: 560px) {
  .payroll-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .profile-layout {
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    align-items: start;
  }

  .people-profiles-panel {
    grid-column: 1 / -1;
  }

  .profile-form-actions {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

@media (max-width: 420px) {
  .role-task-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .role-task-row em {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }
}
