.stock-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.stock-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.stock-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  flex: 0 0 auto;
}

.stock-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}

.stock-search-input {
  width: 100%;
  height: 46px;
  padding-left: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  box-sizing: border-box;
}

.stock-search-input::placeholder {
  color: #94a3b8;
}

.stock-search-input:focus {
  border-color: #2563eb;
  outline: 2px solid #2563eb;
  outline-offset: 0;
}

.stock-filter-control {
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  cursor: pointer;
  box-sizing: border-box;
  min-width: 160px;
}

.stock-filter-control:focus {
  border-color: #2563eb;
  outline: 2px solid #2563eb;
  outline-offset: 0;
}

.stock-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.stock-toolbar-note {
  font-size: 12px;
  color: #94a3b8;
}

.stock-export-wrapper {
  position: relative;
}

.stock-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.stock-export-btn:hover {
  border-color: #2563eb;
  background: #f8faff;
}

.stock-export-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  z-index: 50;
  overflow: hidden;
}

.stock-export-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: #334155;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.stock-export-menu-item:hover {
  background: #f1f5f9;
}

.stock-export-menu-item i {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  flex-shrink: 0;
}

.stock-table-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.stock-table-scroll {
  overflow-x: auto;
}

.stock-table {
  width: 100%;
  min-width: 800px;
  table-layout: fixed;
  border-collapse: collapse;
}

.stock-table thead th {
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stock-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a;
  font-size: 13px;
}

.stock-table tbody tr:hover {
  background: #f8fbff;
}

.stock-table tbody tr:last-child td {
  border-bottom: none;
}

.stock-table-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
}

.stock-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 16px;
  color: #94a3b8;
  font-size: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.stock-col-loja { width: 16%; }
.stock-col-sku { width: 13%; }
.stock-col-desc { width: 24%; }
.stock-col-qty { width: 12%; }
.stock-col-unit { width: 10%; }
.stock-col-date { width: 15%; }
.stock-col-status { width: 13%; }
.stock-col-avail { width: 10%; }
.stock-col-action { width: 10%; }

.stock-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}
.stock-badge--pending_check { background: #fef3c7; color: #92400e; }
.stock-badge--in_stock { background: #d1fae5; color: #065f46; }
.stock-badge--partial_stock { background: #e0f2fe; color: #075985; }
.stock-badge--out_of_stock { background: #fee2e2; color: #991b1b; }
.stock-badge--needs_purchase { background: #fce7f3; color: #9d174d; }

.stock-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: stock-spin 0.6s linear infinite;
}

@keyframes stock-spin {
  to { transform: rotate(360deg); }
}

.sc-edit-panel {
  width: min(480px, calc(100vw - 2rem));
}

.users-btn--danger {
  background: #dc2626;
  color: #fff;
}
.users-btn--danger:hover {
  background: #b91c1c;
}

.sc-receipt-action-btn {
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sc-receipt-action-btn:hover {
  background: #f1f5f9;
}
.sc-receipt-action-btn--edit {
  color: #2563eb;
  border-color: #bfdbfe;
}
.sc-receipt-action-btn--void {
  color: #dc2626;
  border-color: #fecaca;
}

@media (max-width: 640px) {
  .stock-toolbar-card {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
  }

  .stock-filters {
    width: 100%;
    flex-direction: column;
  }

  .stock-search-wrapper {
    flex: none;
    width: 100%;
  }

  .stock-filters .form-input,
  .stock-filters .form-select,
  .stock-filter-control {
    width: 100%;
  }
}
