/* ── Inventering Scanner ── */

.inv-scanner {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  color: #111;
}

/* Drop zone */
.inv-drop-zone {
  display: block;
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.inv-drop-zone:hover,
.inv-drop-zone:active,
.inv-drop-zone.inv-drag-over {
  background: #f0f0f0;
  border-color: #888;
}
.inv-drop-icon  { font-size: 36px; margin-bottom: 8px; }
.inv-drop-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.inv-drop-sub   { font-size: 13px; color: #888; }

/* Queue */
.inv-queue {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  font-size: 13px;
}
.inv-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #222;
}
.inv-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.inv-badge-pending  { background: #fff8e1; color: #a06000; }
.inv-badge-scanning { background: #e3f0ff; color: #1a4fa0; }
.inv-badge-done     { background: #e6f7ee; color: #1a7a40; }
.inv-badge-error    { background: #fde8e8; color: #b91c1c; }

/* Error */
.inv-error {
  margin-top: 8px;
  font-size: 13px;
  color: #b91c1c;
  padding: 8px 12px;
  background: #fde8e8;
  border-radius: 8px;
}

/* Actions */
.inv-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.inv-btn {
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  flex: 1;
  min-width: 140px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.inv-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.inv-btn:active:not(:disabled) {
  transform: scale(0.98);
}
.inv-btn-primary {
  background: #111;
  color: #fff;
}
.inv-btn-primary:hover:not(:disabled) {
  background: #333;
}
.inv-btn-secondary {
  background: transparent;
  color: #111;
  border: 1.5px solid #bbb;
}
.inv-btn-secondary:hover:not(:disabled) {
  border-color: #555;
}

/* Progress */
.inv-progress {
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  min-height: 18px;
}

/* Table */
.inv-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #eee;
  border-radius: 10px;
}
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}
.inv-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}
.inv-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f5f5f5;
  color: #222;
}
.inv-table tr:last-child td {
  border-bottom: none;
}
.inv-table td:first-child {
  color: #bbb;
  font-size: 12px;
}

/* Login / password gate */
.inv-login-wrap {
  max-width: 360px;
  margin: 40px auto;
  text-align: center;
  padding: 32px 24px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
}
.inv-login-icon  { font-size: 40px; margin-bottom: 12px; }
.inv-login-title { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.inv-login-sub   { font-size: 14px; color: #777; margin: 0 0 20px; }
.inv-pw-form     { display: flex; flex-direction: column; gap: 10px; }
.inv-pw-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 16px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.inv-pw-input:focus { border-color: #555; }
.inv-login-wp { margin-top: 16px; font-size: 13px; color: #888; }
.inv-login-wp a { color: #333; text-decoration: underline; }

/* Records header */
.inv-records-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.inv-records-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inv-count-badge {
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.inv-empty { font-size: 14px; color: #aaa; padding: 12px 0; }
.inv-section { margin-bottom: 28px; }

/* Editable cells */
.inv-cell-input {
  width: 100%;
  min-width: 50px;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 13px;
  color: #222;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.inv-cell-input:focus { outline: none; border-color: #aaa; background: #fff; }
.inv-row-actions { white-space: nowrap; text-align: right; }
.inv-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 7px;
  border-radius: 5px;
  color: #555;
}
.inv-icon-btn:hover { background: #f0f0f0; }
.inv-icon-delete:hover { background: #fde8e8; color: #b91c1c; }
@keyframes inv-hl { from { background: #e6f7ee; } to { background: transparent; } }
.inv-row-new { animation: inv-hl 2s ease forwards; }
.inv-row-saved td { background: #e6f7ee; transition: background 0.8s; }

@media (max-width: 480px) {
  .inv-scanner       { padding: 12px; }
  .inv-drop-zone     { padding: 28px 14px; }
  .inv-drop-icon     { font-size: 28px; }
  .inv-drop-title    { font-size: 15px; }
  .inv-btn           { font-size: 14px; padding: 12px 16px; }
}


/* Or divider */
.inv-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
  color: #bbb;
  font-size: 13px;
}
.inv-or-divider::before,
.inv-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

/* Single file queue */
.inv-queue-single {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 8px;
  align-items: center;
  gap: 8px;
}

/* Scan form */
.inv-form-section { border-top: 1.5px solid #eee; padding-top: 24px; }
.inv-form-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.inv-form { display: flex; flex-direction: column; gap: 14px; }
.inv-field { display: flex; flex-direction: column; gap: 5px; }
.inv-label { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.05em; }
.inv-input {
  font-size: 16px;
  padding: 13px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.inv-input:focus { border-color: #555; }

.inv-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.inv-btn-ghost {
  background: transparent;
  color: #888;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.inv-btn-ghost:hover { color: #333; border-color: #aaa; }

/* Count bar */
.inv-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  background: #f5f5f5;
  border-radius: 10px;
  margin-top: 8px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
}
.inv-dl-link {
  font-size: 13px;
  color: #333;
  text-decoration: none;
  border: 1px solid #ccc;
  padding: 5px 12px;
  border-radius: 6px;
  background: #fff;
}
.inv-dl-link:hover { border-color: #888; }
