@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Thin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Vazirmatn";
  color: #17203a;
}

.auth-body,
.app-body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(80, 130, 255, 0.18),
      transparent 34%
    ),
    linear-gradient(135deg, #f8fbff, #eef4ff);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 42px 34px 34px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(31, 45, 78, 0.13);
  overflow: hidden;
  text-align: center;
}

.auth-top-line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(135deg, #083b7a, #008cff);
}

.brand-mark {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  border-radius: 22px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.brand-logo {
  max-width: 58px;
  max-height: 58px;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-card h1,
.app-header h1,
.scan-card h2,
.list-card h2 {
  margin: 0;
}

.auth-subtitle {
  margin: 12px 0 28px;
  color: #6b7280;
  line-height: 1.8;
}

.auth-form {
  display: grid;
  gap: 18px;
  text-align: right;
}

.auth-form label span,
.note-box label {
  display: block;
  margin-bottom: 8px;
  color: #3b4763;
  font-size: 14px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #dce7ff;
  outline: none;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: #17203a;
  background: #edf4ff;
  transition: 0.2s;
}

input:focus,
textarea:focus {
  border-color: #4f8cff;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
  background: #fff;
}

.primary-btn {
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  padding: 14px 22px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  background: linear-gradient(135deg, #3217ff, #7c3cff);
  box-shadow: 0 14px 30px rgba(68, 47, 255, 0.22);
}

.full-btn {
  width: 100%;
  margin-top: 8px;
}

.alert,
.message-box {
  padding: 13px 15px;
  border-radius: 15px;
  line-height: 1.7;
  font-size: 14px;
}

.alert-danger,
.message-error {
  color: #9f1239;
  background: #fff1f2;
}

.message-success {
  color: #047857;
  background: #dffcf1;
}

.message-warning {
  color: #92400e;
  background: #fff7ed;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px;
}

.app-header,
.scan-card,
.list-card,
.stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 231, 255, 0.9);
  border-radius: 26px;
  box-shadow: 0 18px 45px rgba(31, 45, 78, 0.08);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.eyebrow {
  margin-bottom: 8px;
  color: #5b6ee1;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.app-header p,
.scan-card p {
  margin: 10px 0 0;
  color: #7a869f;
}

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

.status-pill,
.user-pill,
.logout-btn,
.old-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.status-pill {
  color: #047857;
  background: #dffcf1;
}

.user-pill {
  color: #334155;
  background: #eef4ff;
}

.logout-btn,
.danger-btn {
  color: #be123c;
  background: #fff1f2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 22px 0;
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  display: block;
  color: #8a95aa;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 26px;
}

.scan-card,
.list-card {
  padding: 24px;
  margin-bottom: 22px;
}

.scan-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 18px;
}

.message-box {
  margin-top: 16px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.list-head span {
  color: #7a869f;
}

.list-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shortage-list {
  display: grid;
  gap: 14px;
}

.shortage-item {
  border: 1px solid #e3ecff;
  border-radius: 22px;
  background: #fbfdff;
  overflow: hidden;
  transition: 0.2s;
}

.shortage-item.selected {
  border-color: #8ab4ff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.12);
}

.item-main {
  display: grid;
  grid-template-columns: 42px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.item-select {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shortage-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.item-image {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #edf4ff;
  color: #8a95aa;
  overflow: hidden;
  font-size: 12px;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.item-title strong {
  font-size: 20px;
}

.old-status {
  color: #4f46e5;
  background: #eef2ff;
}

.item-summary p {
  margin: 10px 0;
  color: #526078;
  line-height: 1.8;
}

.meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #7a869f;
  font-size: 13px;
}

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

.ghost-btn,
.danger-btn {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 800;
}

.ghost-btn {
  color: #4338ca;
  background: #eef2ff;
}

.item-details {
  border-top: 1px solid #e3ecff;
  padding: 18px;
  background: #fff;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  color: #526078;
  line-height: 1.8;
}

.details-grid span {
  padding: 12px;
  border-radius: 14px;
  background: #f7faff;
}

.details-grid .wide {
  grid-column: 1 / -1;
}

.note-box {
  margin-top: 18px;
}

.note-box button {
  margin-top: 10px;
}

.empty-state {
  padding: 34px;
  border-radius: 20px;
  color: #7a869f;
  text-align: center;
  background: #f7faff;
}

.shortage-search {
  margin-bottom: 18px;
}

.shortage-search input {
  width: 100%;
  border: 1px solid #dce7ff;
  outline: none;
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: #17203a;
  background: #edf4ff;
  transition: 0.2s;
}

.shortage-search input:focus {
  border-color: #4f8cff;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
  background: #fff;
}

.customer-strong {
  color: #17203a;
  font-weight: 800;
}

.hidden-by-search {
  display: none !important;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 11px 14px;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  cursor: pointer;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dbe7ff;
  border-radius: 18px;
  background: #f8fbff;
}

.select-all-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 700;
}

.select-all-box input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

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

.selected-count {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce7ff;
  background: #f8fbff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.filter-chip:hover {
  border-color: #8ab4ff;
  background: #eef4ff;
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #3217ff, #7c3cff);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(68, 47, 255, 0.18);
}

.chip-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(23, 32, 58, 0.08);
}

.filter-chip.is-active .chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.cat-bank {
  color: #0f766e;
  background: #ccfbf1;
}

.cat-bars {
  color: #b45309;
  background: #ffedd5;
}

.cat-jewels {
  color: #6d28d9;
  background: #ede9fe;
}

.cat-other {
  color: #475569;
  background: #e2e8f0;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 32, 58, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}

.confirm-card {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(31, 45, 78, 0.18);
  overflow: hidden;
}

.confirm-head {
  padding: 22px 22px 12px;
}

.confirm-head h2 {
  margin: 0;
}

.confirm-head p {
  margin: 8px 0 0;
  color: #7a869f;
  line-height: 1.7;
}

.confirm-list {
  overflow-y: auto;
  padding: 0 18px 12px;
  display: grid;
  gap: 10px;
  min-height: 0;
  flex: 1;
}

.confirm-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e3ecff;
  border-radius: 16px;
  background: #fbfdff;
}

.confirm-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: #edf4ff;
  display: grid;
  place-items: center;
  color: #8a95aa;
  font-size: 10px;
}

.confirm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.confirm-body strong {
  display: block;
}

.confirm-body p {
  margin: 4px 0;
  color: #526078;
  font-size: 13px;
  line-height: 1.6;
}

.confirm-meta {
  color: #7a869f;
  font-size: 12px;
  font-weight: 700;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  padding: 16px 22px 22px;
  justify-content: flex-end;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .app-header,
  .stats-grid,
  .details-grid,
  .scan-form {
    grid-template-columns: 1fr;
  }

  .app-header {
    display: grid;
    align-items: stretch;
  }

  .item-main {
    grid-template-columns: 1fr;
  }

  .item-select {
    justify-content: flex-start;
  }

  .item-actions {
    justify-content: stretch;
  }

  .item-actions button,
  .bulk-actions button,
  .secondary-btn,
  .primary-btn {
    width: 100%;
  }

  .bulk-toolbar,
  .bulk-actions,
  .list-head,
  .list-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-chip {
    width: 100%;
    justify-content: space-between;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions button {
    width: 100%;
  }
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}
