.ydm-sf-form {
  --ydm-sf-accent: #185adb;
  direction: rtl;
  text-align: right;
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #fff;
  color: #15243b;
  font: inherit;
}
.ydm-sf-form *, .ydm-sf-form *::before, .ydm-sf-form *::after { box-sizing: border-box; }
.ydm-sf-form label { display: block; margin-bottom: 9px; color: #15243b; font-weight: 600; }
.ydm-sf-form input[name="barcode"] {
  display: block;
  direction: ltr;
  text-align: right;
  width: 100%;
  min-height: 50px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #a9b6c9;
  border-radius: 9px;
  background: #fff;
  color: #15243b;
  font: inherit;
  font-size: 18px;
}
.ydm-sf-form input[name="barcode"]:focus {
  border-color: var(--ydm-sf-accent);
  outline: 3px solid #d8e5ff;
  outline-offset: 2px;
}
.ydm-sf-form .ydm-sf-submit {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 20px;
  border: 0;
  border-radius: 9px;
  background: var(--ydm-sf-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ydm-sf-form .ydm-sf-submit:hover { filter: brightness(.92); }
.ydm-sf-form .ydm-sf-submit:focus-visible { outline: 3px solid #15243b; outline-offset: 3px; }
.ydm-sf-form .ydm-sf-submit:disabled { opacity: .65; cursor: wait; }
.ydm-sf-form .ydm-sf-status { margin: 14px 0 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ydm-sf-form .ydm-sf-status:empty { display: none; }
.ydm-sf-form .ydm-sf-status[data-state="error"] { color: #ae1b27; }
.ydm-sf-form .ydm-sf-status[data-state="confirmed"] { color: #166038; }
.ydm-sf-form .ydm-sf-status[data-state="unconfirmed"] { color: #805100; }
.ydm-sf-form .ydm-sf-status[data-state="duplicate"] { color: #805100; }
.ydm-sf-form .ydm-sf-status[data-state="pending"] { color: #4d5e76; }
.ydm-sf-form .ydm-sf-honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) { .ydm-sf-form { padding: 20px; border-radius: 12px; } }

.ydm-sf-history { direction: rtl; width: 100%; margin: 28px auto; padding: 24px; border: 1px solid #e1e7ef; border-radius: 16px; background: #fff; color: #15243b; font: inherit; box-sizing: border-box; }
.ydm-sf-history * { box-sizing: border-box; }
.ydm-sf-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ydm-sf-history-heading h3 { margin: 0; font-size: 21px; color: #15243b; }
.ydm-sf-history button { padding: 10px 16px; border: 1px solid #a9b6c9; border-radius: 8px; background: #f2f6fc; color: #15243b; font: inherit; font-size: 14px; cursor: pointer; }
.ydm-sf-history button:focus-visible { outline: 3px solid #185adb; outline-offset: 2px; }
.ydm-sf-history button:disabled { opacity: .55; cursor: wait; }
.ydm-sf-history-status { margin: 12px 0; font-size: 14px; line-height: 1.6; }
.ydm-sf-history-status:empty { display: none; }
.ydm-sf-history-status[data-state="error"] { color: #805100; }
.ydm-sf-history-results { margin-top: 16px; font-size: 14px; }
.ydm-sf-history-scroll { height: 420px; max-height: 65vh; min-height: 240px; overflow: auto; max-width: 100%; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ydm-sf-history-scroll:focus-visible { outline: 3px solid #185adb; outline-offset: 2px; }
.ydm-sf-history .ydm-sf-history-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; text-align: right; }
.ydm-sf-history-table th, .ydm-sf-history-table td { border: 0; border-bottom: 1px solid #e1e7ef; padding: 11px 12px; vertical-align: top; }
.ydm-sf-history-table th { position: sticky; top: 0; z-index: 1; background: #f2f6fc; font-weight: 700; white-space: nowrap; }
.ydm-sf-history-table td:nth-child(-n+4) { white-space: nowrap; }
.ydm-sf-history-table td:last-child { min-width: 220px; max-width: 420px; overflow-wrap: anywhere; }
.ydm-sf-history-pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 18px; }
@media (max-width: 600px) { .ydm-sf-history { padding: 16px; } .ydm-sf-history-heading h3 { font-size: 19px; } .ydm-sf-history-scroll { height: 340px; } }
