/* I5.1 inbound archive — compact enterprise RTL control-center */
.bia-page { padding-bottom: 32px; }
.bia-header--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #e3e8ef;
}
.bia-title {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2d3d;
}
.bia-intro {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  max-width: 40rem;
}
.bia-header__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bia-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e3e8ef;
}
.bia-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bia-badge.is-zero { background: #94a3b8; }
.bia-badge-label { font-size: 12px; color: #475569; }

.bia-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.bia-toolbar__search { flex: 1 1 180px; max-width: 280px; height: 34px; }
.bia-toolbar__select { flex: 0 1 160px; height: 34px; padding-top: 4px; padding-bottom: 4px; }

.bia-table-wrap {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  overflow: hidden;
}
.bia-table { margin: 0; }
.bia-table > thead > tr > th {
  background: #f8fafc;
  border-bottom: 1px solid #e3e8ef;
  font-weight: 600;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
  padding: 10px 12px;
}
.bia-table > tbody > tr > td { padding: 10px 12px; vertical-align: middle; border-top: 1px solid #f1f5f9; }

.bia-row.is-new {
  background: #fff;
  box-shadow: inset 3px 0 0 #c2410c;
}
[dir="rtl"] .bia-row.is-new { box-shadow: inset -3px 0 0 #c2410c; }
.bia-row.is-highlight { outline: 2px solid #2563eb; outline-offset: -2px; }

.bia-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.bia-dot__mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 auto;
}
.bia-dot--new .bia-dot__mark { background: #ea580c; }
.bia-dot--seen .bia-dot__mark { background: #16a34a; }

.bia-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.bia-chip--normal { background: #f1f5f9; color: #475569; }
.bia-chip--otp { background: #ffedd5; color: #9a3412; }
.bia-chip--najiz { background: #ecfdf5; color: #047857; }
.bia-chip--moj { background: #eff6ff; color: #1d4ed8; }

.bia-sender { font-weight: 600; color: #1f2d3d; }
.bia-time-primary { font-size: 13px; color: #1f2d3d; }
.bia-time-secondary { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.bia-actions { white-space: nowrap; }
.bia-actions .btn-link { padding-left: 6px; padding-right: 6px; }

.bia-body-box {
  margin-top: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.6;
  color: #1f2d3d;
}

.bia-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0 0 10px;
}
.bia-kv > div { margin: 0; }
.bia-kv dt {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.bia-kv dd {
  margin: 2px 0 0;
  font-size: 14px;
  color: #1f2d3d;
  font-weight: 600;
}

.bia-modal-note { color: #64748b; font-size: 13px; margin-bottom: 12px; }
.bia-section { margin-bottom: 14px; }
.bia-section__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #475569;
  text-transform: none;
}
.bia-match {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.bia-match--ok { border-color: #bbf7d0; background: #f0fdf4; }
.bia-match--warn { border-color: #fde68a; background: #fffbeb; }
.bia-match--review { border-color: #e2e8f0; background: #f8fafc; }
.bia-match__title { font-weight: 700; color: #1f2d3d; font-size: 14px; }
.bia-match__hint, .bia-match__meta { margin-top: 4px; font-size: 12px; color: #64748b; }

.bia-decision {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.bia-decision__label { font-size: 11px; color: #1d4ed8; font-weight: 600; }
.bia-decision__value { font-size: 15px; color: #1e3a8a; }

.bia-before-after {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.bia-ba {
  flex: 1 1 120px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.bia-ba span { display: block; font-size: 11px; color: #64748b; margin-bottom: 4px; }
.bia-ba strong { display: block; font-size: 15px; color: #1f2d3d; }
.bia-ba small { display: block; margin-top: 4px; font-size: 12px; color: #475569; font-weight: 600; }
.bia-ba-arrow { font-size: 18px; color: #94a3b8; }

.bia-proposal-header .modal-title { display: inline-block; margin-inline-end: 8px; }
.bia-proposal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}
.bia-proposal-footer .btn-success { min-width: 160px; }
.bia-help-link { font-size: 12px; color: #94a3b8; margin: 6px 0 0; }

.bia-audit-card {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}
.bia-audit-card__name { font-weight: 700; color: #1f2d3d; margin-bottom: 6px; }
.bia-audit-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: #64748b;
}
.bia-audit-details { margin-top: 12px; }
.bia-audit-details summary { cursor: pointer; font-weight: 600; color: #475569; }
.bia-audit-list { margin: 8px 0 0; padding-inline-start: 18px; font-size: 12px; color: #64748b; }

.bia-cards { display: none; gap: 10px; }
.bia-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 12px;
}
.bia-card.is-new { box-shadow: inset 3px 0 0 #c2410c; }
[dir="rtl"] .bia-card.is-new { box-shadow: inset -3px 0 0 #c2410c; }
.bia-card__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.bia-card__sender { font-weight: 700; color: #1f2d3d; margin-bottom: 4px; }
.bia-card__time { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.bia-card__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.bia-mobile-only { display: none; }
.bia-desktop-only { display: block; }

@media (max-width: 767px) {
  .bia-desktop-only { display: none !important; }
  .bia-mobile-only { display: grid !important; }
  .bia-toolbar { flex-direction: column; align-items: stretch; gap: 6px; }
  .bia-toolbar__search, .bia-toolbar__select {
    max-width: none;
    width: 100%;
    height: 36px;
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .bia-kv { grid-template-columns: 1fr; }
  .bia-proposal-footer .btn-success { width: 100%; }
  .bia-header--compact { padding: 10px 12px; }
}

/* legacy badge aliases kept for any leftover markup */
.bia-najiz-badge, .bia-moj-badge, .bia-sens-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.bia-najiz-badge { background: #ecfdf5; color: #047857; }
.bia-moj-badge { background: #eff6ff; color: #1d4ed8; }
.bia-sens-badge { background: #ffedd5; color: #9a3412; }
.bia-status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.bia-status--new { background: #fde8d8; color: #9a3412; }
.bia-status--seen { background: #e8f5e9; color: #1b5e20; }
.bia-menu-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-inline-start: 6px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}
.hidden { display: none !important; }
