@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;
}

@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;
  }
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}
