@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #15243d;
  --muted: #738097;
  --muted-light: #9aa6b8;
  --border: #e4eaf2;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --page: #f2f6fb;
  --blue: #1769ff;
  --blue-soft: #edf4ff;
  --green: #18a783;
  --green-soft: #eaf9f4;
  --red: #d55f59;
  --shadow: 0 22px 60px rgba(31, 58, 96, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 8%, rgba(23, 105, 255, 0.09), transparent 24rem),
    radial-gradient(circle at 92% 28%, rgba(24, 167, 131, 0.08), transparent 22rem),
    var(--page);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 30px;
}

.hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 715px;
  margin: 0 auto 38px;
  text-align: center;
}

.hero > div:last-child {
  flex: 1;
}

.logo {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-top: 7px;
  border-radius: 12px;
  background: var(--blue);
  box-shadow: 0 9px 22px rgba(23, 105, 255, 0.3);
  transform: rotate(-8deg);
}

.logo__dot {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.logo__line {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 19px;
  height: 5px;
  border-radius: 8px;
  background: #fff;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero h1 {
  margin: 7px 0 9px;
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.35;
}

.hero__text {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 2;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}

.install-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #cbdcff;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(23, 105, 255, 0.18);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.install-button:hover {
  background: #0e58df;
  transform: translateY(-1px);
}

.install-button:focus-visible {
  outline: 3px solid rgba(23, 105, 255, 0.25);
  outline-offset: 3px;
}

.install-button__icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d8eee7;
  border-radius: 999px;
  background: var(--green-soft);
  color: #268d76;
  font-size: 0.68rem;
  font-weight: 700;
}

.connection-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 167, 131, 0.12);
}

.connection-badge.is-offline {
  border-color: #f1dec1;
  background: #fff8ec;
  color: #a36e26;
}

.connection-badge__dot.is-offline {
  background: #d68b2b;
  box-shadow: 0 0 0 4px rgba(214, 139, 43, 0.12);
}

.connection-badge.is-limited {
  border-color: #f0d5d2;
  background: #fff4f3;
  color: var(--red);
}

.inventory-card {
  margin-bottom: 24px;
  padding: 27px 31px;
}

.inventory-card__heading {
  align-items: center;
  margin-bottom: 21px;
}

.card-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.8;
}

.file-format-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid #dce9ff;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  gap: 15px;
}

.file-dropzone {
  display: grid;
  min-height: 130px;
  place-items: center;
  align-content: center;
  padding: 17px;
  border: 1px dashed #afc7eb;
  border-radius: 18px;
  background: #f8fbff;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.file-dropzone:hover,
.file-dropzone.is-dragover {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.file-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-dropzone__icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  place-items: center;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.file-dropzone__title {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.file-dropzone__hint {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.file-dropzone__name {
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-guide {
  min-height: 130px;
  padding: 16px 17px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.upload-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.8;
}

.upload-guide__title {
  margin-bottom: 9px !important;
  color: var(--ink) !important;
  font-size: 0.75rem !important;
  font-weight: 800;
}

.sample-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 9px;
}

.sample-columns span {
  padding: 7px 8px;
  border: 1px solid #e2eaf4;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.67rem;
  font-weight: 700;
  text-align: center;
}

.import-status {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.8;
}

.import-status.is-success {
  color: var(--green);
  font-weight: 700;
}

.import-status.is-error {
  color: var(--red);
  font-weight: 700;
}

.column-mapping {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr);
  align-items: end;
  gap: 16px;
  margin-top: 15px;
  padding: 15px;
  border: 1px solid #e0e9f6;
  border-radius: 16px;
  background: #fbfdff;
}

.column-mapping strong {
  display: block;
  font-size: 0.75rem;
}

.column-mapping p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.7;
}

.mapping-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 9px;
}

.mapping-controls label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.65rem;
}

.mapping-controls select {
  width: 100%;
  height: 39px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 0.7rem;
}

.mapping-controls select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.1);
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
  align-items: stretch;
  gap: 24px;
}

.card {
  border: 1px solid rgba(220, 228, 239, 0.85);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.form-card,
.result-card {
  padding: 31px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}

.card-heading h2 {
  margin: 3px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #dce9ff;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #4772b8;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.12);
}

.form-fields {
  display: grid;
  gap: 20px;
}

.field__topline,
.field__help--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field label {
  display: block;
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 700;
}

.field__label {
  display: block;
  color: var(--ink);
  font-size: 0.87rem;
  font-weight: 700;
}

.field__topline > span {
  color: var(--muted-light);
  font-size: 0.72rem;
}

.input-box {
  position: relative;
  margin-top: 9px;
}

.input-box input {
  width: 100%;
  height: 54px;
  padding: 0 17px 0 73px;
  border: 1px solid var(--border);
  border-radius: 17px;
  outline: none;
  background: var(--surface-soft);
  color: var(--ink);
  direction: ltr;
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.input-box input::placeholder {
  color: #b1bbca;
  font-weight: 500;
}

.input-box input:hover {
  border-color: #ccd8e9;
}

.input-box input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

.input-box input[aria-invalid="true"] {
  border-color: #e26e66;
  box-shadow: 0 0 0 4px rgba(226, 110, 102, 0.1);
}

.input-box__unit {
  position: absolute;
  top: 50%;
  left: 16px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
}

.field__help {
  min-height: 17px;
  margin: 7px 2px 0;
  color: var(--muted-light);
  font-size: 0.7rem;
  line-height: 1.65;
}

.field__help strong {
  color: var(--blue);
  font-weight: 700;
}

.method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 9px;
}

.method-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 67px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  outline: none;
  background: var(--surface-soft);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.method-option:hover {
  border-color: #ccd8e9;
}

.method-option:focus-within {
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

.method-option.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.method-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.method-option__content {
  min-width: 0;
}

.method-option__title,
.method-option__rate {
  display: block;
}

.method-option__title {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.method-option__rate {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.65rem;
}

.method-option__check {
  display: grid;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid #cbd6e5;
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 0.72rem;
  font-weight: 800;
}

.method-option.is-selected .method-option__check {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.field__help--split strong {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
}

.progress {
  height: 5px;
  margin: 12px 2px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0f7;
}

.progress__fill {
  display: block;
  width: 30%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #62a0ff);
  transition: width 200ms ease, background 200ms ease;
}

.progress__fill.is-valid {
  background: linear-gradient(90deg, var(--green), #5ad4b1);
}

.progress__fill.is-too-high {
  background: linear-gradient(90deg, #f17868, #ffad88);
}

.formula {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 23px;
  padding: 14px 15px;
  border: 1px solid #e2ecff;
  border-radius: 16px;
  background: #f7faff;
}

.formula__icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.formula strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.76rem;
}

.formula p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.8;
}

.form-error {
  margin: 14px 2px 0;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.8;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 55px;
  margin-top: 22px;
  padding: 13px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(21, 36, 61, 0.17);
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover {
  background: #223858;
  box-shadow: 0 13px 24px rgba(21, 36, 61, 0.22);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:focus-visible {
  outline: 3px solid rgba(23, 105, 255, 0.32);
  outline-offset: 3px;
}

.primary-button__arrow {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 1.1rem;
  line-height: 1;
}

.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px solid #d9e4f2;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.secondary-button:hover {
  border-color: #a9c5ef;
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.secondary-button:focus-visible {
  outline: 3px solid rgba(23, 105, 255, 0.22);
  outline-offset: 3px;
}

.secondary-button--compact {
  width: auto;
  min-width: 115px;
  min-height: 39px;
  margin-top: 0;
  padding: 8px 11px;
  font-size: 0.67rem;
}

.result-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.96));
}

.result-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.2rem;
}

.main-result {
  position: relative;
  overflow: hidden;
  padding: 23px 24px 21px;
  border-radius: 20px;
  background: linear-gradient(125deg, #1668ff 0%, #2b80f8 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(23, 105, 255, 0.22);
}

.main-result::after {
  position: absolute;
  right: -18px;
  bottom: -44px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 15px rgba(255, 255, 255, 0.04),
    0 0 0 30px rgba(255, 255, 255, 0.025);
  content: "";
}

.main-result p,
.main-result strong,
.main-result span {
  position: relative;
  z-index: 1;
}

.main-result p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.75rem;
}

.main-result strong {
  display: block;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.55;
}

.main-result span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.payment-flow {
  display: grid;
  grid-template-columns: 1fr 42px 1fr;
  align-items: center;
  gap: 11px;
  margin: 24px 0 23px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.75);
}

.flow-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.flow-number {
  display: grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
}

.flow-number--green {
  background: var(--green-soft);
  color: var(--green);
}

.flow-item div {
  min-width: 0;
}

.flow-item div > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-item strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-line {
  position: relative;
  height: 1px;
  background: #dce4ee;
}

.flow-line::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b8c7da;
  content: "";
  transform: translate(-50%, -50%);
}

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

.result-item {
  min-height: 81px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.74);
}

.result-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.55;
}

.result-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.55;
}

.result-item--green {
  border-color: #cceee3;
  background: var(--green-soft);
}

.result-item--green strong {
  color: #168a6e;
}

.result-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding-top: 21px;
}

.result-note__icon {
  display: grid;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #bac7d8;
  border-radius: 50%;
  color: #7e8ca1;
  font-family: Georgia, serif;
  font-size: 0.68rem;
  font-weight: 700;
}

.result-note p {
  margin: 0;
  color: var(--muted-light);
  font-size: 0.67rem;
  line-height: 1.8;
}

.inventory-results-card {
  margin-top: 24px;
  padding: 31px;
}

.inventory-results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 21px;
}

.inventory-results-heading h2 {
  margin: 3px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.inventory-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid #dce9ff;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 0.67rem;
  white-space: nowrap;
}

.inventory-summary strong {
  color: var(--blue);
  font-size: 0.72rem;
}

.search-summary-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 17px;
  padding: 12px 14px;
  border: 1px solid #e0e8f3;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.68rem;
}

.search-summary-bar strong {
  color: var(--ink);
  font-size: 0.72rem;
}

.search-summary-bar__divider {
  width: 1px;
  height: 17px;
  margin: 0 2px;
  background: #d8e1ed;
}

.inventory-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.inventory-table {
  width: 100%;
  min-width: 1090px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.7rem;
}

.inventory-table th,
.inventory-table td {
  padding: 12px 10px;
  border-left: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  text-align: center;
  white-space: nowrap;
}

.inventory-table th:last-child,
.inventory-table td:last-child {
  border-left: 0;
}

.inventory-table tr:last-child td {
  border-bottom: 0;
}

.inventory-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7fd;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.6;
}

.inventory-table th small {
  color: var(--blue);
  font-size: 0.59rem;
  font-weight: 700;
}

.inventory-table td {
  color: var(--ink);
  font-weight: 600;
}

.inventory-table tbody tr:hover td {
  background: #fbfdff;
}

.inventory-table td:first-child {
  color: var(--blue);
  font-weight: 800;
  direction: ltr;
}

.inventory-table td:nth-child(2),
.inventory-table td:nth-child(3) {
  color: #52647e;
}

.inventory-table td.installment-cell {
  color: var(--green);
  font-weight: 800;
}

.inventory-empty-state {
  display: grid;
  min-height: 155px;
  place-items: center;
  align-content: center;
  padding: 25px;
  border: 1px dashed #d7e1ed;
  border-radius: 16px;
  background: #fbfdff;
  text-align: center;
}

.inventory-empty-state__icon {
  display: grid;
  width: 35px;
  height: 35px;
  margin-bottom: 9px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.2rem;
}

.inventory-empty-state strong {
  font-size: 0.8rem;
}

.inventory-empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.8;
}

.inventory-note {
  margin: 17px 2px 0;
  color: var(--muted-light);
  font-size: 0.67rem;
  line-height: 1.9;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: #a1adbd;
  font-size: 0.68rem;
}

.footer__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 820px) {
  .page-shell {
    width: min(620px, calc(100% - 30px));
    padding-top: 40px;
  }

  .hero {
    margin-bottom: 30px;
  }

  .upload-layout {
    grid-template-columns: 1fr;
  }

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

  .result-card {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(100% - 22px, 620px);
    padding-top: 28px;
  }

  .hero {
    display: block;
  }

  .logo {
    margin: 0 auto 15px;
  }

  .hero__text {
    font-size: 0.83rem;
    line-height: 1.9;
  }

  .inventory-card,
  .inventory-results-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .inventory-card__heading,
  .inventory-results-heading {
    align-items: flex-start;
  }

  .inventory-card__heading,
  .inventory-results-heading {
    display: block;
  }

  .file-format-badge,
  .inventory-summary {
    margin-top: 13px;
  }

  .column-mapping {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mapping-controls {
    grid-template-columns: 1fr 1fr;
  }

  .secondary-button--compact {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search-summary-bar__divider {
    display: none;
  }

  .form-card,
  .result-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .card-heading {
    margin-bottom: 22px;
  }

  .method-options {
    grid-template-columns: 1fr;
  }

  .payment-flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flow-line {
    width: 1px;
    height: 15px;
    margin-right: 13px;
  }

  .flow-line::after {
    top: 100%;
    left: 0;
  }

  .result-grid {
    gap: 8px;
  }

  .result-item {
    padding: 12px 10px;
  }
}

/* Embedded CRM layout; computation is unchanged. */
body{background:#f7f9fd}.page-shell{max-width:1200px;padding:18px}.hero{padding-top:12px}.hero-actions{display:none}

.crm-line-search{border:1px solid #dbe4ff;background:#f6f8ff;border-radius:18px;padding:18px;margin-bottom:20px}.crm-line-search__heading,.crm-line-search__controls{display:flex;align-items:center;justify-content:space-between;gap:12px}.crm-line-search__heading h3{margin:4px 0 0}.crm-line-search__controls{margin-top:14px}.crm-line-search__controls .input-box{flex:1}.crm-line-search__controls .secondary-button{margin:0;white-space:nowrap}.crm-line-search__status{font-size:13px;color:#667085;margin:12px 0 0}.crm-line-search__status[data-type="error"]{color:#c62828}.crm-line-search__status[data-type="success"]{color:#16845b}@media(max-width:640px){.crm-line-search__heading,.crm-line-search__controls{align-items:stretch;flex-direction:column}.crm-line-search__heading .status-badge{align-self:flex-start}.crm-line-search__controls .secondary-button{width:100%}}

/* Shared with the CRM: IRANSans when available (installed or in ../fonts), and the dark theme chosen in the CRM. */
body,button,input,select,textarea{font-family:'IRANSans','Vazirmatn',Tahoma,sans-serif}
html[data-theme=dark]{--ink:#e7ebf4;--muted:#94a0b8;--muted-light:#6f7a92;--border:#263045;--surface:#151b28;--surface-soft:#1a2132;--page:#0d121c;--blue:#6d8cff;--blue-soft:rgba(109,140,255,.14);--green:#3ccf8e;--green-soft:rgba(60,207,142,.13);--red:#ff7b83;--shadow:0 20px 50px rgba(0,0,0,.45);color-scheme:dark}
html[data-theme=dark] body{background:radial-gradient(circle at 10% 8%,rgba(109,140,255,.10),transparent 24rem),radial-gradient(circle at 92% 28%,rgba(60,207,142,.08),transparent 22rem),var(--page)}
html[data-theme=dark] input,html[data-theme=dark] select{background:var(--surface-soft);color:var(--ink);border-color:var(--border)}
html[data-theme=dark] .card,html[data-theme=dark] .result-card{background:var(--surface);border-color:var(--border)}
html[data-theme=dark] .formula,html[data-theme=dark] .file-dropzone,html[data-theme=dark] .column-mapping,html[data-theme=dark] .inventory-empty-state,html[data-theme=dark] .sample-columns span,html[data-theme=dark] .input-box input:focus,html[data-theme=dark] .mapping-controls select{background:var(--surface-soft);border-color:var(--border);color:var(--ink)}
html[data-theme=dark] .inventory-table tbody tr:hover td{background:var(--surface-soft)}
html[data-theme=dark] .secondary-button{background:var(--surface-soft);border-color:var(--border);color:var(--ink)}
html[data-theme=dark] .status-badge,html[data-theme=dark] .file-format-badge,html[data-theme=dark] .inventory-summary{border-color:var(--border);color:var(--blue);background:var(--blue-soft)}
html[data-theme=dark] .method-option__check{border-color:var(--border)}
html[data-theme=dark] .progress{background:var(--surface-soft)}
html[data-theme=dark] .input-box input:hover,html[data-theme=dark] .method-option:hover{border-color:var(--muted-light)}
html[data-theme=dark] .primary-button:hover{background:#34508a}
html[data-theme=dark] .crm-line-search{background:var(--surface-soft);border-color:var(--border)}
html[data-theme=dark] .crm-line-search__status{color:var(--muted)}
html[data-theme=dark] .payment-flow,html[data-theme=dark] .flow-item,html[data-theme=dark] .result-item,html[data-theme=dark] .result-note,html[data-theme=dark] .search-summary-bar,html[data-theme=dark] .inventory-results-card{background:var(--surface-soft);border-color:var(--border)}
html[data-theme=dark] .result-item--green{background:var(--green-soft)}
html[data-theme=dark] .input-box input{background:var(--surface-soft);color:var(--ink);border-color:var(--border)}
