:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #182e32;
  background: #f4f7f7;
  font-synthesis: none;
  --teal: #126b65;
  --muted: #64777b;
  --line: #dce6e5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--teal);
}
button,
input,
select,
textarea {
  border: 1px solid #c4d4d2;
  border-radius: 7px;
}
input,
select,
textarea {
  padding: 12px;
  background: white;
  color: #182e32;
  width: 100%;
}
button {
  padding: 10px 16px;
  font-weight: 600;
  background: white;
  color: var(--teal);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #d8a33e;
  outline-offset: 3px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 18px 0 8px;
}
.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.primary:hover {
  background: #0b534e;
}
.secondary:hover,
.quiet:hover {
  background: #eaf2f1;
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.wide {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
}
.topbar {
  height: 82px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 5%;
  gap: 32px;
}
.brand {
  font-weight: 750;
  font-size: 24px;
  letter-spacing: -0.7px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #173d3a;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: var(--teal);
  border-radius: 9px;
  color: white;
  font-size: 26px;
}
.tagline {
  font-size: 13px;
  color: var(--muted);
}
#account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 38px 36px 60px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 2px;
  color: var(--teal);
  margin: 0 0 14px;
}
h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 0 0 12px;
  font-weight: 650;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin: 0 0 7px;
  font-weight: 650;
}
h3 {
  font-size: 17px;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.small {
  font-size: 13px;
}
.login-layout {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
  padding: 20px 40px;
}
.welcome h1 {
  font-size: 59px;
  line-height: 1.1;
  letter-spacing: -2px;
}
.welcome > p:not(.eyebrow) {
  font-size: 17px;
  color: #566e71;
  line-height: 1.8;
}
.welcome-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  font-size: 13px;
}
.welcome-note span {
  background: #d7ebe4;
  border-radius: 50%;
  padding: 5px 8px;
  color: var(--teal);
}
.login-card {
  padding: 38px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 35px #123d3610;
}
.login-card h2 {
  font-size: 25px;
}
.login-card > .muted {
  font-size: 13px;
  margin-bottom: 28px;
}
.help {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 24px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin: 18px 0 34px;
}
.practice-control {
  min-width: 240px;
}
.practice-control label {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.role {
  display: block;
  font-size: 12px;
  margin-top: 7px;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 12px 2px 15px;
  background: transparent;
  color: var(--muted);
}
.tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  gap: 20px;
}
.search {
  display: flex;
  gap: 8px;
  width: 380px;
}
.search input {
  font-size: 13px;
}
.count {
  font-size: 12px;
  background: #edf3f2;
  border-radius: 20px;
  padding: 4px 9px;
  margin-left: 7px;
  vertical-align: middle;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
th {
  padding: 14px 24px;
  background: #f7f9f9;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 650;
}
td {
  padding: 19px 24px;
  border-bottom: 1px solid #edf1f1;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #eef5f3;
  border-radius: 8px;
  color: var(--teal);
  font-size: 19px;
  flex-shrink: 0;
}
.product-mark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.subline {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.5;
}
.quantity {
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.workspace-foot {
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
}
.error {
  background: #fff1ed;
  border: 1px solid #edcbc2;
  border-radius: 7px;
  padding: 12px;
  color: #9e3927;
  font-size: 13px;
  line-height: 1.6;
}
#notice {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: #dcefe5;
  color: #245842;
  font-size: 14px;
}
#notice.error {
  background: #fff1ed;
  color: #9e3927;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  width: min(650px, calc(100vw - 24px));
  max-height: 90vh;
  color: #182e32;
  box-shadow: 0 24px 80px #102f3b30;
}
dialog::backdrop {
  background: #16333366;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.dialog-heading .eyebrow {
  margin-bottom: 8px;
}
#stock-practice {
  font-size: 13px;
  margin: 10px 0 24px;
}
.batch {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.batch p {
  margin: 0;
  font-size: 14px;
}
.batch-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.badge {
  font-size: 11px;
  border-radius: 4px;
  background: #f0f3f2;
  padding: 3px 6px;
  color: #586c69;
  margin-left: 6px;
}
.badge.expired {
  background: #fff0e8;
  color: #a24c20;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 5px;
  left: 5px;
  background: white;
  padding: 10px;
  z-index: 100;
}
@media (max-width: 850px) {
  .tagline {
    display: none;
  }
  .login-layout {
    gap: 32px;
    padding: 20px 0;
  }
  .welcome h1 {
    font-size: 43px;
  }
  .login-card {
    padding: 25px;
  }
  .workspace-heading {
    align-items: flex-start;
  }
  th,
  td {
    padding: 14px 16px;
  }
  .panel-toolbar {
    flex-wrap: wrap;
  }
  .search {
    width: 100%;
  }
}
@media (max-width: 600px) {
  main {
    padding: 24px 16px;
  }
  .topbar {
    height: 70px;
    padding: 0 16px;
  }
  .brand {
    font-size: 22px;
  }
  #user-name {
    display: none;
  }
  .login-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .welcome {
    padding: 12px;
  }
  .welcome h1 {
    font-size: 40px;
  }
  .welcome-note {
    margin-top: 20px;
  }
  .workspace-heading {
    flex-direction: column;
    gap: 20px;
  }
  h1 {
    font-size: 29px;
  }
  .practice-control {
    width: 100%;
  }
  .panel-toolbar {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .batch {
    align-items: flex-start;
  }
  .batch-actions {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
  }
  dialog {
    padding: 22px;
  }
  .welcome br {
    display: none;
  }
  .welcome > p:not(.eyebrow) {
    font-size: 15px;
  }
  .welcome h1 br {
    display: block;
  }
}
@media print {
  .topbar,
  .tabs,
  .practice-control,
  button,
  .search,
  .pagination,
  .workspace-foot {
    display: none !important;
  }
  body {
    background: white;
  }
  main {
    padding: 0;
  }
  .panel {
    border: 0;
  }
  th,
  td {
    padding: 10px;
  }
  .table-scroll {
    overflow: visible;
  }
}
:where(.search, .search input, .panel-toolbar > div) {
  min-width: 0;
}
.table-scroll {
  position: relative;
}
.find-panel {
  padding: 28px;
}
.find-search {
  max-width: 850px;
  margin: 24px 0 16px;
}
.input-action {
  display: flex;
  gap: 10px;
}
.input-action input {
  flex: 1;
  min-width: 0;
}
.find-actions,
.stock-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0;
}
.picture-dropzone {
  margin: 18px 0;
  padding: 22px;
  border: 2px dashed #a9c8c4;
  border-radius: 12px;
  background: #f5faf9;
  text-align: center;
}
.picture-dropzone p { margin: 8px 0 12px; }
.picture-dropzone.is-dragover,
.picture-dropzone:focus-within {
  border-color: #1679ae;
  background: #eaf5fc;
}
.picture-dropzone .help { margin-bottom: 0; }
.photo-label {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  color: #244f49;
  font-size: 13px;
  max-width: 235px;
}
.photo-label input {
  max-width: 100%;
  font-size: 12px;
  padding: 6px;
}
.search-progress {
  color: #315d54;
  min-height: 24px;
  margin: 20px 0;
}
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin: 20px 0;
}
.candidate-card {
  border: 1px solid #d6e3dc;
  background: #fbfdfb;
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.candidate-card h3 {
  margin: 10px 0;
  font-size: 19px;
}
.candidate-card p {
  margin: 9px 0;
}
.candidate-card > button {
  display: block;
  margin-top: 16px;
}
.candidate-card > .candidate-picture {
  float: right;
  width: 280px;
  max-width: 38%;
  height: 220px;
  padding: 8px;
  margin: 0 0 18px 24px;
  border: 1px solid #cadbd3;
  border-radius: 10px;
  background: #fff;
  cursor: zoom-in;
}
.candidate-picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.picture-dialog {
  width: min(92vw, 900px);
  max-height: 92vh;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 60px #12382f66;
}
.picture-dialog::backdrop { background: #102f2a99; }
.picture-dialog button { display: block; margin: 0 0 12px auto; }
.picture-dialog img {
  display: block;
  width: 100%;
  height: min(78vh, 800px);
  object-fit: contain;
}
.candidate-card a,
.evidence a {
  display: inline-block;
  margin-right: 10px;
  color: #215a4d;
  overflow-wrap: anywhere;
}
.pack-summary {
  background: #eef5ef;
  padding: 10px 14px;
  border-radius: 8px;
  color: #235547;
}
#photo-preview {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid #d6e3dc;
  margin-top: 16px;
  border-radius: 10px;
}
#packaging-preview {
  width: 110px;
  height: 130px;
  object-fit: contain;
}
#camera-preview {
  display: block;
  width: 100%;
  max-width: 500px;
  max-height: 300px;
  margin: 15px 0;
}
#product-editor {
  scroll-margin-top: 20px;
}
#product-editor .form-grid {
  gap: 0 20px;
}
#product-editor details {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid #d6e3dc;
  border-radius: 8px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
  font-weight: 500;
  margin: 16px 0;
}
.check-label input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #28604f;
}
.identifier-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr auto;
  gap: 8px;
  margin: 8px 0;
}
.identifier-row input,
.identifier-row select {
  min-width: 0;
  margin: 0;
}
.evidence p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
#identification-followup button {
  margin: 6px 8px 6px 0;
}
.tabs {
  flex-wrap: wrap;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  .find-panel {
    padding: 18px;
  }
  .input-action {
    flex-direction: column;
  }
  .identifier-row {
    grid-template-columns: 1fr;
    border: 1px solid #d6e3dc;
    padding: 10px;
    border-radius: 8px;
  }
  #photo-preview {
    align-items: flex-start;
    gap: 12px;
  }
  #packaging-preview {
    width: 75px;
    height: 90px;
  }
  .candidate-grid {
    grid-template-columns: 1fr;
  }
  .candidate-card > .candidate-picture {
    float: none;
    width: 100%;
    max-width: none;
    height: 240px;
    margin: 0 0 18px;
  }
}
.review-product-picture { display:block; max-width:360px; max-height:280px; object-fit:contain; margin:12px 0; }
